feat(tools/web): bucket 5xx separately with a transient-retry hint#676
Merged
Conversation
#632 actionable-error work stopped at 429 + 403 — generic 5xx still fell through to the catch-all "rephrase the query / switch engine" message, which is the wrong advice for a transient server-side failure. Add serverError5xx + fetchServerError5xx pointing the model at a browser sanity-check and a 30s retry instead. Existing webSearch 503 test tightened from `/web_search 503.*try:/` to assert on the new `retry in 30s` substring; a parallel webFetch 502 test added in the same shape. Credit to @MyPrototypeWhat — #671 surfaced the gap and the 503 test case lands with this PR.
|
Thanks for picking this up cleanly 🙏 |
ChasLui
pushed a commit
to ChasLui/DeepSeek-Reasonix
that referenced
this pull request
May 23, 2026
…sengine#676) esengine#632 actionable-error work stopped at 429 + 403 — generic 5xx still fell through to the catch-all "rephrase the query / switch engine" message, which is the wrong advice for a transient server-side failure. Add serverError5xx + fetchServerError5xx pointing the model at a browser sanity-check and a 30s retry instead. Existing webSearch 503 test tightened from `/web_search 503.*try:/` to assert on the new `retry in 30s` substring; a parallel webFetch 502 test added in the same shape. Credit to @MyPrototypeWhat — esengine#671 surfaced the gap and the 503 test case lands with this PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends the actionable-error work from #632 with a dedicated 5xx bucket. Before this, generic 5xx fell through to the catch-all
webErrors.status/webErrors.fetchStatusmessage — which advises rephrasing the query or switching engines, neither of which helps when the upstream server is just temporarily broken.After:
web_search 503 — try: open the search URL in a browser; if it loads this is transient and a retry in 30s may helpweb_fetch 502 for {url} — try: open the URL in a browser; if it loads this is transient and a retry in 30s may helpsearchStatusError/fetchStatusErrorget one extra branch each (status >= 500 && status <= 599); EN + zh-CN +TranslationSchemaupdated in step.Credit to @MyPrototypeWhat — #671 surfaced this gap (their PR added a 5xx bucket alongside a parallel re-do of #632's 429/403 work). #671 is closed as superseded, but the 5xx insight + the 503 test case land here.
Test plan
npm run verify— 170 files / 2628 tests passingwebSearch503 test tightened from/web_search 503.*try:/to assert on the newretry in 30ssubstringwebFetch502 test in the same shape