From ff53be5d13f00b65aaf66af20c4f33fdc161705b Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Fri, 28 Nov 2025 23:41:35 +0100 Subject: [PATCH] Throw exception for null RawHeader in HeaderQueryBehavior Previously, the code continued execution when the RawHeader property of the query result was null. This change introduces an InvalidOperationException to handle this case, ensuring that the absence of a valid RawHeader is treated as an error. The exception message includes ProfileId and ActionId for better debugging context. --- src/ReC.Application/Common/Behaviors/HeaderQueryBehavior.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ReC.Application/Common/Behaviors/HeaderQueryBehavior.cs b/src/ReC.Application/Common/Behaviors/HeaderQueryBehavior.cs index 8149416..4b66322 100644 --- a/src/ReC.Application/Common/Behaviors/HeaderQueryBehavior.cs +++ b/src/ReC.Application/Common/Behaviors/HeaderQueryBehavior.cs @@ -18,7 +18,9 @@ public class HeaderQueryBehavior(IRecDbContext dbContext, ILogger>(result.RawHeader);