retry transient Durable Object errors at the routing boundary#118
Closed
FredKSchott wants to merge 1 commit into
Closed
retry transient Durable Object errors at the routing boundary#118FredKSchott wants to merge 1 commit into
FredKSchott wants to merge 1 commit into
Conversation
|
I think this should be in partyserver, I'll fix it there tonight. But I'd be curious what error is being thrown that's not being caught, usually happens in an unprotected hook or something. Could you ask your agent to try and analyze and figure it out? point it at our agents codebase as well if it'll help. |
|
landed in cloudflare/partykit#399 should go out tomorrow in |
Member
Author
|
amazing thanks! |
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.
On the Cloudflare target, Flue calls
routeAgentRequestto hand a request off to the per-agent Durable Object. Workerd can throw transient infrastructure errors from this RPC (e.g.Internal error in Durable Object storage caused object to be reset.) before user code runs inside the DO. These errors bypass the agents SDK's_tryCatch/Agent::onErrorentirely, so they can only be handled at the routing boundary.This PR wraps
routeAgentRequestwith a smallrouteWithDoRetryhelper that applies exponential backoff per Cloudflare's documented guidance:err.retryable === trueanderr.overloaded !== true.app.onError→ canonical 500 envelope if all attempts fail.Scope is intentionally narrow: only the two Cloudflare-only
routeAgentRequestcall sites influe-app.ts. The Node target is untouched.cc @threepointone for review.