Update condition to handle non-zero ReturnValue cases
Modified the `else if` condition in `MainQueryExecutionBehavior.cs` to check if `result.ReturnValue` is either not null or not equal to 0. This ensures that the `JobSqlException` is thrown for additional scenarios where `result.ReturnValue` is non-zero, improving error handling and robustness.
This commit is contained in:
@@ -78,7 +78,7 @@ namespace ECMJobRunner.Application.Profiles.Commands.Behaviors
|
||||
reason: "Main Query returned nothing.",
|
||||
query: sqlMainQuery,
|
||||
innerException: null);
|
||||
else if (result.ReturnValue is not null)
|
||||
else if (result.ReturnValue is not null || result.ReturnValue != 0)
|
||||
throw new JobSqlException(
|
||||
profileId: command.Job.ProfileId,
|
||||
jobName: "Triggering DEX",
|
||||
|
||||
Reference in New Issue
Block a user