Repository navigation
fix(http): stop treating 200 bodies with status and data keys as proxy responses - #9889
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
[Medium impact] The PR appears safe to merge. SummaryBoth HTTP tools now use the HTTP response to decide success and return its full body, status, and headers.
Reviews (1) · Last reviewed commit: "fix(http): stop treating 200 bodies with..." · Reviewed by Greptile |
6 tasks done
waleedlatif1
added a commit
that referenced
this pull request
Nov 11, 2026
…flows (#9909) #9889 fixed JSend-style 200s ({status, data}) being reported as failures by deleting the old /api/proxy envelope branch outright. That also changed two behaviors existing workflows rely on: 200 bodies with success/status/data were unwrapped (<api.data.x> read the inner data) and success: false failed the block. Restore both through one shared toHttpToolResponse helper, gated on the body carrying a success field — the only shape the old route ever produced — so only the misclassified case changes. Non-string envelope errors are now serialized instead of surfacing as [object Object].
This branch was previously 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
http_requestandwebhook_requestreported a 200 as failed when the JSON body had top-levelstatusanddatakeys (JSend-style{"status":"success","data":{...}})transformResponsein both tools still sniffed the body for the envelope the old/api/proxyroute returned ({success,status,data,headers}). That route was removed in improvement(files): update execution for passing base64 strings #2906, so the branch only ever matched third-party bodies, returningsuccess: undefined, the body'sstatusstring instead of the HTTP code, and empty headerssuccess: response.ok, real status and headers). Non-2xx is still rejected earlier inexecuteTool{success: true, status, data}was previously unwrapped (<api.data>was the innerdata). It now returns the full body like every other response, so such references move to<api.data.data>Type of Change
Testing
tools/index.test.tsthat runs both real tools throughexecuteTool(the file's mocked registry stubshttp_request, which is why existing tests missed this). Red on the pre-fix code, green afterbunx vitest run tools/index.test.ts tools/http executor/handlers/api(278 passed), biome,check:test-patterns,check:comment-hygiene; full gate in CIChecklist
test-auditauthoring gate)