SC202 means an active request finished, but its HTTP status did not match
workload.status. The connection drained, yet the response changed during
shutdown or the config expects the wrong status.
| Code | SC202 FAIL |
|---|---|
| Stage | In-flight responses |
| CLI exit code | 1 |
| What it means | A request that was running when SIGTERM arrived finished, but with a different HTTP status than workload.status. |
| Message |
|
| First thing to check | Let requests already in progress finish normally; reject only new work during shutdown. |
What should I check?
- Run the workload without shutdown and record its normal status.
- Confirm that
workload.statusmatches that response. - Check whether shutdown middleware returns
503for every request. - Make sure only new work is rejected during the drain.
- With a probe barrier, check errors that occur after the work starts.
{
"workload": {
"path": "/slow",
"status": 200,
"started": { "type": "response-headers" }
}
}Do not change the expected status merely to make the test pass. It should describe the response a successful request returns during normal operation.
How do I verify the fix?
Run the workload without a shutdown and during a shutdown. Both responses
should use the same success status when the request began before SIGTERM.
New requests may correctly receive 503; the distinction is when they enter
the application. Log the draining state at request start if middleware order
is unclear.