diff --git a/DocumentOperator.API/Middleware/ExceptionHandlingMiddleware.cs b/DocumentOperator.API/Middleware/ExceptionHandlingMiddleware.cs index 24e1ce8..765bb7f 100644 --- a/DocumentOperator.API/Middleware/ExceptionHandlingMiddleware.cs +++ b/DocumentOperator.API/Middleware/ExceptionHandlingMiddleware.cs @@ -1,5 +1,4 @@ using DocumentOperator.Domain.Common.Exceptions; -using DocumentOperator.Domain.Exceptions; using FluentValidation; using Microsoft.AspNetCore.Mvc; using System.Net; @@ -67,7 +66,7 @@ public class ExceptionHandlingMiddleware(RequestDelegate Next) } ), - // Not Found Exception (404 Not Found) + // Bad Request Exception (400 Bad Request) BadRequestException badReqEx => ( HttpStatusCode.BadRequest, new ProblemDetails @@ -93,19 +92,6 @@ public class ExceptionHandlingMiddleware(RequestDelegate Next) } ), - // Swiss QR Code Not Found Exception (404 Not Found) - SwissQrCodeNotFoundException qrNotFoundEx => ( - HttpStatusCode.NotFound, - new ProblemDetails - { - Type = "https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.4", - Title = "Swiss QR Code Not Found", - Status = (int)HttpStatusCode.NotFound, - Detail = qrNotFoundEx.Message, - Instance = context.Request.Path - } - ), - // Generic Exception (500 Internal Server Error) _ => ( HttpStatusCode.InternalServerError,