Skip to content

Commit 2b385f4

Browse files
authored
fix: detect update failure from client output (not just exit code) (#49)
- GeneralUpdate catches exceptions internally, exits with code 0 - Check output for ERROR:, FATAL:, JsonException keywords - Report FAIL if error found in client output
1 parent f092247 commit 2b385f4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Services/SimulationService.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,12 @@ private void Validate(SimulateConfigModel config)
173173
return (false, output + "\n[TIMEOUT] Simulation exceeded time limit");
174174
}
175175

176+
// Also check output for error indicators (GeneralUpdate catches exceptions internally)
176177
await Task.WhenAll(readTask, errorTask);
177-
return (p.ExitCode == 0, output.ToString());
178+
var outputStr = output.ToString();
179+
var hasError = outputStr.Contains("ERROR:") || outputStr.Contains("FATAL:") || outputStr.Contains("JsonException");
180+
181+
return (!hasError && p.ExitCode == 0, outputStr);
178182
}
179183

180184
private void VerifyUpdateResult(SimulateConfigModel config, SimulationResult result)

0 commit comments

Comments
 (0)