fix: http action error attribution by splitting request deadlines - #758
fix: http action error attribution by splitting request deadlines#758justinkaseman wants to merge 1 commit into
Conversation
|
👋 justinkaseman, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
|
There was a problem hiding this comment.
LGTM. I was under the impression that @MStreet3 fixed this problem in #552 but it looks like that PR didn't correctly distinguish between user and system errors and it also didn't split the timeouts between the HTTP request and Gateway not responding at all. @MStreet3 please review this one and correct me if I misunderstood something please.




Endpoint timeouts were reported as platform execution errors, firing
"[HTTP Action] Execution Errors in More than F nodes" on a user error.
Two causes:
The node derived a single deadline from
input.Timeoutand started itbefore marshal, DON resolution, awaitConnection and SendToGateway.
The gateway derives the same timeout starting on receipt, so the node
always expired first. The gateway's correctly classified response
arrived after responses.cleanup() had run and was dropped, so
IncrementExternalEndpointError never fired.
The
ctx.Done()branch returned NewUserError but calledIncrementExecutionTimeout, which also bumped executionError (Gabriel's fix fix: Execution Errors in More than F nodes not alerting on user errors #755). A
timeout had nowhere else to land.
Changes:
Split the deadline.
sendCtxkeepsinput.Timeoutand bounds onlydelivery to a gateway.
waitCtxis created after the send withinput.Timeout+ResponseGraceMs(default 5s, mirroring the gateway'sown send-response budget), so the gateway always reaches its timeout
first and its classified response wins.
Split the
ctx.Done()branch three ways:TimeoutError(gateway silent,system/DeadlineExceeded, counts as an execution error because it now
genuinely is one),
CanceledError(caller cancelled, system/Canceled,new http_action_request_canceled_count, not an execution error), and
the existing classified-response paths, unchanged.