Repository navigation
fix(bridge): give timeouts and extension errors a named code - #38
Open
amirhmoradi wants to merge 1 commit into
Open
amirhmoradi wants to merge 1 commit into
amirhmoradi wants to merge 1 commit into
Conversation
A bridge-side timeout came back as HTTP 500 with no code, so the CLI and MCP clients reported it as THUNDERBIRD_ERROR. Timeouts now return 504 TIMEOUT, a missing extension 503 EXTENSION_DISCONNECTED, and uncoded extension errors 500 THUNDERBIRD_ERROR. Extension-supplied codes such as FORBIDDEN are kept. Idea from vitalio-sh/thunderbird-cli#26 (dd95a6a), reimplemented. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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
When the extension didn't answer before the per-request timeout, the bridge returned HTTP 500 with no
code. The CLI and MCP clients fill a missing code from the status, so agents sawTHUNDERBIRD_ERRORand treated "timed out, outcome unknown" as a real Thunderbird failure (or retried a send that may already have gone out).bridge/bridge.jsnow always names the failure:TIMEOUTEXTENSION_DISCONNECTEDTHUNDERBIRD_ERRORFORBIDDEN)No client change is needed: both clients already prefer the bridge's
code. Also fixes the stale "30s" timeout in theSPEC.mdanddocs/COMMANDS.mderror tables (the default is 120s).Bridge-only. No change under
extension/, to the access policy, or to command/tool counts.Idea from vitalio-sh/thunderbird-cli#26 /
dd95a6a, reimplemented (no code copied). Found by the weekly upstream scan, ODIAA-2491. Last week's ledger had parked this under ODIAA-2403 (extension batch), but it needs no add-on change, so it ships here.Tests
test/bridge-security.mjs(8 checks, using a fake extension that never answers and one that returns errors). 4 of them fail againstmain; all pass with the fix.npm run test:all: exit 0, all suites 0 failed (bridge-security 41/41, was 33).npm run test:pack-smoke: 10/10.CHANGELOG entry under
[Unreleased]→ Fixed. If #37 merges first, this needs a trivial CHANGELOG rebase.🤖 Generated with Claude Code