diff --git a/src/Handlers/ResultResponseWriter.cs b/src/Handlers/ResultResponseWriter.cs index 21ff955..08a5edb 100644 --- a/src/Handlers/ResultResponseWriter.cs +++ b/src/Handlers/ResultResponseWriter.cs @@ -48,6 +48,13 @@ await res.WriteAsync( cancellationToken); break; + case ForbiddenResult r: + res.StatusCode = 403; + await res.WriteAsync( + this.SerializeOptional(r.Message, r.Body), + cancellationToken); + break; + case NotFoundResult _: res.StatusCode = 404; break; diff --git a/src/Linn.Common.Service.csproj b/src/Linn.Common.Service.csproj index 793067b..5d9e629 100644 --- a/src/Linn.Common.Service.csproj +++ b/src/Linn.Common.Service.csproj @@ -1,11 +1,11 @@ - + .NET utilities for consistent API and service responses. Provides standard result types (e.g., SuccessResult, BadRequestResult, NotFoundResult) and helpers for generating HTTP responses with correct status codes and serialized content. net10.0 enable Linn.Common.Service Linn.Common.Service - 3.0.0 + 3.1.0 enable @@ -13,7 +13,7 @@ - +