Skip to content

fix: handle malformed path hook exceptions - #17194

Draft
svelte-triage-bot[bot] wants to merge 1 commit into
mainfrom
triage/kit-17193-malformed-handle
Draft

svelte-triage-bot[bot] wants to merge 1 commit into
mainfrom
triage/kit-17193-malformed-handle

Conversation

@svelte-triage-bot

Copy link
Copy Markdown
Contributor
  • The malformed-path handle call ran before the ordinary Redirect/fatal-error boundary, allowing hook exceptions to reject server.respond().
  • #15744 added that call so hooks and the default 400 error page still run; this keeps that behavior while sharing the normal exception responder.
  • Reuse the existing Redirect/fatal conversion instead of restoring an immediate text 400 or special-casing Redirect alone.
  • Cover ordinary and data-request redirects, cookie propagation, and unknown errors for all adapters and internal server fetches.

Fixes #17193

@pkg-svelte-dev

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 848cec6:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/848cec6eb3715559802ebb4cb5df0fc26edd5364

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

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 Sep 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 848cec6

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

handle runs outside the error boundary for undecodable paths, so a redirect() thrown in handle crashes the server

3 participants