From b653b4c9f95a50e1bb4b10cdf9e5328adf874454 Mon Sep 17 00:00:00 2001 From: Lewis Renfrew Date: Fri, 10 Jul 2026 16:37:37 +0100 Subject: [PATCH 1/2] 403 --- src/Handlers/ResultResponseWriter.cs | 7 +++++++ src/Linn.Common.Service.csproj | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) 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..6895200 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 @@ - + From 1dcd3121fb0f89880f063cb50e5fa7124a113ecb Mon Sep 17 00:00:00 2001 From: Lewis Renfrew Date: Fri, 10 Jul 2026 16:39:59 +0100 Subject: [PATCH 2/2] fix --- src/Linn.Common.Service.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Linn.Common.Service.csproj b/src/Linn.Common.Service.csproj index 6895200..5d9e629 100644 --- a/src/Linn.Common.Service.csproj +++ b/src/Linn.Common.Service.csproj @@ -13,7 +13,7 @@ - +