Skip to content

docs: update error handling docs - #16749

Open
Rich-Harris wants to merge 1 commit into
version-3from
update-error-handling-docs
Open

docs: update error handling docs#16749
Rich-Harris wants to merge 1 commit into
version-3from
update-error-handling-docs

Conversation

@Rich-Harris

Copy link
Copy Markdown
Member

mostly just tweaking the order — it's weird to say 'An unknown error is any other exception' for anything but the last mentioned category. also adds a mention of validation errors

@pkg-svelte-dev

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 181bcfe:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/181bcfefa57920985c1b6c49299009d55d42c17b

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

@changeset-bot

changeset-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 181bcfe

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

This function is called for every error thrown while loading, rendering, or responding to a request. This allows for two things:

- you can log the error
- you can generate a custom representation of the error that is safe to show to users, omitting sensitive details like messages and stack traces. The returned value becomes the value of `page.error`.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this used to be true, but not any more since handleError applies to errors inside the user's boundaries

@svelte-docs-bot

Copy link
Copy Markdown

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.

1 participant