public static JsonResult RespondUnhandledError(object data, ErrorCode errorCode) { var response = new ErrorResponseObject { ResponseType = "error", Data = data, ErrorCode = errorCode }; return(new JsonWithHttpCodeResult(response, HttpStatusCode.InternalServerError)); }
public static JsonResult RespondHandledError(object data, ErrorCode errorCode) { var response = new ErrorResponseObject { ResponseType = "error", Data = data, ErrorCode = errorCode }; return(new JsonWithHttpCodeResult(response, HttpStatusCode.BadRequest)); }