Example #1
0
        /// <summary>
        /// Error Response
        /// </summary>
        /// <param name="code"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        protected IHttpActionResult ResponseError(int code, string message)
        {
            JsonResponseErrorParams resultParams = new JsonResponseErrorParams();

            resultParams.code    = code;
            resultParams.message = message;

            JsonResponseError result = new JsonResponseError();

            result.error = resultParams;

            return(Ok(result));
        }
Example #2
0
        /// <summary>
        /// Error Response
        /// </summary>
        /// <param name="code"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        private IHttpActionResult ResponseError(int code, string message)
        {
            JsonResponseErrorParams resultParams = new JsonResponseErrorParams();

            resultParams.code    = code;
            resultParams.message = message;

            JsonResponseError result = new JsonResponseError();

            result.error = resultParams;

            //return Content(functions.GetHttpStatusCode(resultParams.code), result);
            return(Ok(result));
        }