private static void HandleBadRequest(HttpActionExecutedContext ctx, BadRequestException e) { ctx.Response = new HttpResponseMessage { StatusCode = HttpStatusCode.BadRequest, }; SerializeError(ctx, new { Url = ctx.Request.RequestUri.PathAndQuery, e.Message, Error = e.Message }); }
private static void HandleBadRequest(IHttpContext ctx, BadRequestException e) { ctx.SetStatusToBadRequest(); SerializeError(ctx, new { Url = ctx.Request.RawUrl, e.Message, Error = e.Message }); }