diff --git a/Cu.Yemekhane.API/Middlewares/UnhandledExceptionsMiddleware.cs b/Cu.Yemekhane.API/Middlewares/UnhandledExceptionsMiddleware.cs index de6a1fe..1ee6ff8 100644 --- a/Cu.Yemekhane.API/Middlewares/UnhandledExceptionsMiddleware.cs +++ b/Cu.Yemekhane.API/Middlewares/UnhandledExceptionsMiddleware.cs @@ -22,7 +22,7 @@ public async Task Invoke(HttpContext context) var message = $"Api exception: {exception.Message}."; response.ErrorMessage = message; - context.Response.StatusCode = 200; + context.Response.StatusCode = 400; context.Response.ContentType = "application/json"; await context.Response.WriteAsync(JsonConvert.SerializeObject(response)); } @@ -36,4 +36,4 @@ public async Task Invoke(HttpContext context) await context.Response.WriteAsync(JsonConvert.SerializeObject(response)); } } -} \ No newline at end of file +}