4 Commits

Author SHA1 Message Date
Developer 02
e0736ff6df Improve HeaderQueryBehavior error handling and logging
Updated HeaderQueryBehavior to handle null or missing
REQUEST_HEADER gracefully by logging warnings and setting
action.IsReturnedNoData.HeaderQuery to true instead of
throwing exceptions. Enhanced log messages for failed
RawHeader deserialization to improve clarity and added
pipeline continuity by calling await next(cancel).
Refactored log formatting for consistency.
2025-11-29 00:55:43 +01:00
Developer 02
ff53be5d13 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.
2025-11-28 23:41:35 +01:00
6f5409f528 Implement HeaderQueryBehavior with database support
Updated `HeaderQueryBehavior` to include dependency injection
for `IRecDbContext` and `ILogger`, enabling database interaction
and logging. Replaced the placeholder `NotImplementedException`
in the `Handle` method with functionality to process `HeaderQuery`
SQL results, deserialize JSON headers, and assign them to the
`Headers` property of the action. Added error handling and
logging for deserialization failures. Updated constructor and
method signatures to support new dependencies and asynchronous
behavior. Added necessary `using` directives for new features.
2025-11-27 17:16:13 +01:00
4f364e3eb2 Refactor behaviors to Common namespace
Moved `BodyQueryBehavior` and `HeaderQueryBehavior` from
`ReC.Application.RecActions.Behaviors` to
`ReC.Application.Common.Behaviors` to reflect their broader
applicability. Updated `DependencyInjection.cs` to use the new
namespace. This reorganization improves code structure and
maintainability.
2025-11-27 15:54:24 +01:00