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
			});
		}
예제 #2
0
			private static void HandleBadRequest(IHttpContext ctx, BadRequestException e)
			{
				ctx.SetStatusToBadRequest();
				SerializeError(ctx, new
				{
					Url = ctx.Request.RawUrl,
					e.Message,
					Error = e.Message
				});
			}