added RespondWithError to API responder