Add logging for unexpected BodyQuery and IsReturnedNoData
Improve observability by adding a warning log when `request.BodyQuery` is not null but `request.IsReturnedNoData.BodyQuery` is false. The log message highlights potential issues, such as skipped `BodyQueryBehavior` execution or missing control steps, and includes `ProfileId` and `ActionId` for better debugging context.
This commit is contained in:
parent
e0736ff6df
commit
07afcf3aa2
@ -45,6 +45,17 @@ public class InvokeRecActionCommandHandler(
|
||||
using var reqBody = new StringContent(request.Body);
|
||||
httpReq.Content = reqBody;
|
||||
}
|
||||
else if(request.BodyQuery is not null && !request.IsReturnedNoData.BodyQuery)
|
||||
{
|
||||
logger?.LogWarning(
|
||||
"Although BodyQuery returns null, the IsReturnedNoData variable has not been set to TRUE. " +
|
||||
"This indicates that BodyQueryBehavior has not been executed or that the relevant control step has been skipped. " +
|
||||
"The relevant behavior must be verified to ensure that the process does not produce unexpected conditions. " +
|
||||
"ProfileId: {ProfileId}, ActionId: {ActionId}",
|
||||
request.ProfileId,
|
||||
request.ActionId
|
||||
);
|
||||
}
|
||||
|
||||
using var response = await http.SendAsync(httpReq, cancel);
|
||||
var body = await response.Content.ReadAsStringAsync(cancel);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user