diff --git a/.version b/.version
index 1490e44..a2c8172 100644
--- a/.version
+++ b/.version
@@ -1 +1 @@
-0.17.20.32
\ No newline at end of file
+0.17.20.33
\ No newline at end of file
diff --git a/NetinaShop.Api/Controller/SeedController.cs b/NetinaShop.Api/Controller/SeedController.cs
index 3a611d8..277762a 100644
--- a/NetinaShop.Api/Controller/SeedController.cs
+++ b/NetinaShop.Api/Controller/SeedController.cs
@@ -24,6 +24,21 @@ public class SeedController : ICarterModule
.WithDisplayName("SeedCategoriesAsync")
.HasApiVersion(1.0);
+ group.MapGet("test3", () =>
+ {
+ return TypedResults.Problem("Server Error 2 ( EXCEPTION THROWN )");
+ })
+ .WithDisplayName("SeedCategoriesAsync")
+ .HasApiVersion(1.0);
+
+
+ group.MapGet("test3", () =>
+ {
+ return TypedResults.StatusCode(500);
+ })
+ .WithDisplayName("SeedCategoriesAsync")
+ .HasApiVersion(1.0);
+
//group.MapPost("categories", SeedCategoriesAsync)
// .WithDisplayName("SeedCategoriesAsync")
// .HasApiVersion(1.0);
diff --git a/NetinaShop.Api/NetinaShop.Api.csproj b/NetinaShop.Api/NetinaShop.Api.csproj
index 9715b12..abfed67 100644
--- a/NetinaShop.Api/NetinaShop.Api.csproj
+++ b/NetinaShop.Api/NetinaShop.Api.csproj
@@ -6,8 +6,8 @@
enable
true
Linux
- 0.17.20.32
- 0.17.20.32
+ 0.17.20.33
+ 0.17.20.33
diff --git a/NetinaShop.Api/WebFramework/MiddleWares/ExceptionHandlerMiddleware.cs b/NetinaShop.Api/WebFramework/MiddleWares/ExceptionHandlerMiddleware.cs
index 6eab0d8..b3b6ac3 100644
--- a/NetinaShop.Api/WebFramework/MiddleWares/ExceptionHandlerMiddleware.cs
+++ b/NetinaShop.Api/WebFramework/MiddleWares/ExceptionHandlerMiddleware.cs
@@ -145,7 +145,7 @@ public class ExceptionHandlerMiddleware
Formatting = Formatting.Indented
});
- context.Response.StatusCode = (int)HttpStatusCode.InternalServerError;
+ context.Response.StatusCode = 501;
context.Response.ContentType = "application/json";
await context.Response.WriteAsJsonAsync(result);
}
@@ -171,7 +171,7 @@ public class ExceptionHandlerMiddleware
Formatting = Formatting.Indented
});
- context.Response.StatusCode = (int)httpStatusCode;
+ context.Response.StatusCode = 501;
context.Response.ContentType = "application/json";
await context.Response.WriteAsJsonAsync(result);
}