ready for arvan
parent
7aa057cd8c
commit
54312efb3b
|
@ -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);
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<InvariantGlobalization>true</InvariantGlobalization>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
<AssemblyVersion>0.17.20.32</AssemblyVersion>
|
||||
<FileVersion>0.17.20.32</FileVersion>
|
||||
<AssemblyVersion>0.17.20.33</AssemblyVersion>
|
||||
<FileVersion>0.17.20.33</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue