Skip to content

fix: declare UTF-8 plain text for dev middleware fallback errors - #17468

Draft
svelte-triage-bot[bot] wants to merge 1 commit into
mainfrom
triage/kit-17466-dev-error-charset
Draft

svelte-triage-bot[bot] wants to merge 1 commit into
mainfrom
triage/kit-17466-dev-error-charset

Conversation

@svelte-triage-bot

Copy link
Copy Markdown
Contributor
  • The dev fallback sends raw diagnostics without a MIME type or charset; declare text/plain; charset=utf-8 on the common catch path rather than adding HTML rendering or fixing only env validation.
  • Keep the fallback for setup failures after #17000, preserving stack formatting and stackless messages from #16374 and console logging from #16550.
  • Cover stacked and stackless errors with and without JavaScript, checking browser decoding and literal markup; production error rendering is unchanged.

Fixes #17466

@pkg-svelte-dev

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 90b2d83:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/90b2d835941e9e1054389fe01d86d6509485cea0

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/17468

Note

This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed.

@changeset-bot

changeset-bot Bot commented Oct 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 90b2d83

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dev server 500 response has no Content-Type, so non-ASCII error messages render garbled

0 participants