Repository navigation
nebo.fetch: Nebo's own refusal reaches the page as fetch() gives it - #14
Merged
Merged
Conversation
When the app's http/proxy refuses the call (403 naming the permission the app lacks, 502 for an address Nebo never reaches), that answer is returned as it is, status and words, instead of being parsed as the proxy's JSON envelope (which threw "... is not valid JSON"). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
localrivet
force-pushed
the
fetch-proxy-errors
branch
from
October 23, 2026 15:16
4ff937f to
336dc46
Compare
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 top of #11.
The problem
nebo.fetch('https://…')goes through the app'shttp/proxy. When Nebo itself refuses the call it answers in plain text: 403app lacks permission: network:<host>(no grant, or the owner said no) or 502proxy error: … resolves to a local or private network address.neboFetchcalledresp.json()on every answer, so the page gotSyntaxError: … is not valid JSONinstead of the refusal (found in the review of nebo #1001, whose App Studio skill tells builders what these refusals look like).The change
fetch()gives any answer: its status and its words.Tests
test/fetch.test.mjs: a 403 refusal reaches the page with its status and text; a site's own 404 still comes back as the site gave it.pnpm build && pnpm test: 9/9 (it fails on the old dist with the JSON error).Note: nebo's bundled
app/static/sdk/nebo.global.jsis rebuilt from the SDK by the nebo PR that lands last in the app-platform train (#1018 / #1020); rebuild it after this merges.🤖 Generated with Claude Code