Shutdown Check

Search documentation

Find a page or section

SC202: In-flight request got the wrong status

SC202 (in-flight request got the wrong status) means a request running at SIGTERM finished with a status other than workload.status. Find what changed it.

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.

CodeSC202 FAIL
StageIn-flight responses
CLI exit code1
What it meansA request that was running when SIGTERM arrived finished, but with a different HTTP status than workload.status.
Message
  • In-flight request returned HTTP <status>; expected <workload.status>
First thing to checkLet 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.status matches that response.
  • Check whether shutdown middleware returns 503 for every request.
  • Make sure only new work is rejected during the drain.
  • With a probe barrier, check errors that occur after the work starts.
shutdown-check.json
{
  "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.