Skip to content

EW-6888 Report killSwitch exceptions as failed#6737

Open
fhanau wants to merge 1 commit intomainfrom
felix/042426-overloaded-outcome-p2
Open

EW-6888 Report killSwitch exceptions as failed#6737
fhanau wants to merge 1 commit intomainfrom
felix/042426-overloaded-outcome-p2

Conversation

@fhanau
Copy link
Copy Markdown
Contributor

@fhanau fhanau commented May 6, 2026

These errors don't actually indicate that the runtime is overloaded, assign the default exception type to them.

See the downstream PR for context.

These errors don't actually indicate that the runtime is overloaded, assign the
default exception type to them.
@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented May 6, 2026

The exploration is thorough and confirms the change is safe. Let me verify the key points:

  1. Exception detail-based routing: outcomeFromException() in observer.c++ checks SCRIPT_KILLED_DETAIL_ID before checking the exception type, so the EventOutcome::KILL_SWITCH mapping is unaffected by this change.

  2. HTTP status code impact: In worker-entrypoint.c++ and server.c++, OVERLOADED maps to HTTP 503 while other types map to 500. Changing from Overloaded to Failed means kill switch errors will now produce 500 instead of 503 — which is the stated intent ("These errors don't actually indicate that the runtime is overloaded").

  3. JS .overloaded property: Kill switch exceptions converted to JS will no longer have .overloaded = true set — again, correct per the PR's intent.

  4. Tests are updated: Both test cases in test.c++ are updated to assert FAILED instead of OVERLOADED.

This is a clean, well-scoped change. The code is correct, the tests cover the modified behavior, and no backward compatibility concerns exist (this is internal exception type classification, not a user-facing API change).

LGTM

github run

@fhanau fhanau requested a review from dom96 May 7, 2026 15:11
@fhanau fhanau marked this pull request as ready for review May 7, 2026 15:12
@fhanau fhanau requested review from a team as code owners May 7, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant