Skip to content

breaking: remove handleValidationError, pass validation errors to handleError - #16672

Merged
elliott-with-the-longest-name-on-github merged 1 commit into
elliott/update-handle-errorfrom
elliott/handle-validation-errors
Aug 10, 2026
Merged

breaking: remove handleValidationError, pass validation errors to handleError#16672
elliott-with-the-longest-name-on-github merged 1 commit into
elliott/update-handle-errorfrom
elliott/handle-validation-errors

Conversation

@elliott-with-the-longest-name-on-github

Copy link
Copy Markdown
Contributor

Basically what the title says. Instead of two hooks, the new design of handleError allows us to centralize this.

@pkg-svelte-dev

pkg-svelte-dev Bot commented Aug 6, 2026

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 8b5cf83:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/8b5cf8390ae3235adda44a9947655d0fd3440030

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

@changeset-bot

changeset-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8b5cf83

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 Major

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

@svelte-docs-bot

Copy link
Copy Markdown

@elliott-with-the-longest-name-on-github
elliott-with-the-longest-name-on-github force-pushed the elliott/handle-validation-errors branch 3 times, most recently from 6e99c64 to 4cc21e8 Compare August 7, 2026 17:37
Comment thread documentation/docs/20-core-concepts/60-remote-functions.md Outdated
Comment on lines -735 to -739
/**
* The event before `derive_remote_function_event` hid or stubbed properties.
* Hooks like `handleValidationError` receive this so `url` etc. stay accessible
*/
readonly original_event?: RequestEvent;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

hell yeah

Rich-Harris added a commit that referenced this pull request Aug 10, 2026
…16694)

First slice of #16676. Follow-ups in this stack: `@sveltejs/kit/params`,
the `$app/server` types, and hooks types once #16664/#16672 settle.

---------

Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
@Rich-Harris
Rich-Harris force-pushed the elliott/handle-validation-errors branch from 4b5dbb2 to 9e03360 Compare August 10, 2026 20:50
@elliott-with-the-longest-name-on-github elliott-with-the-longest-name-on-github added needs-ecosystem-ci This PR needs to have an ecosystem CI run started prior to its last commit before merging. and removed needs-ecosystem-ci This PR needs to have an ecosystem CI run started prior to its last commit before merging. labels Aug 10, 2026
@elliott-with-the-longest-name-on-github
elliott-with-the-longest-name-on-github merged commit 0b3e2b3 into version-3 Aug 10, 2026
26 of 27 checks passed
@elliott-with-the-longest-name-on-github
elliott-with-the-longest-name-on-github deleted the elliott/handle-validation-errors branch August 10, 2026 21:32
teemingc added a commit that referenced this pull request Aug 11, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to version-3, this PR
will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`version-3` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `version-3`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @sveltejs/kit@3.0.0-next.19

### Major Changes

- breaking: move `defineParams` and associated types to
`@sveltejs/kit/params`
([#16716](#16716))

- breaking: run all errors through the `handleError` hook
([#16664](#16664))

- breaking: move `Page`, `ReadonlyURL` and `ReadonlyURLSearchParams`
from `@sveltejs/kit` to `$app/state`
([#16694](#16694))

- breaking: move `BeforeNavigate`, `OnNavigate`, `AfterNavigate`,
`Navigation`, `NavigationTarget`, `NavigationType`, `GotoOptions` and
the `Navigation*` variant types from `@sveltejs/kit` to
`$app/navigation` ([#16694](#16694))

- breaking: move `ActionResult` and `SubmitFunction` from
`@sveltejs/kit` to `$app/forms`
([#16694](#16694))

- breaking: remove `handleValidationError` and pass remote function
validation errors to `handleError` with `kind: 'validation'`
([#16672](#16672))

### Minor Changes

- feat: ignore files with + prefix if they contain test/spec/stories
([#16715](#16715))

### Patch Changes

- fix: rebuild the dev manifest when route files disappear during an
incremental update
([#16643](#16643))

- fix: externalize `@opentelemetry/api` to prevent bundler chunk
colocation between `instrumentation.server.js` and application code
([#16302](#16302))

- fix: surface prerender errors during development
([#16507](#16507))
## @sveltejs/adapter-node@6.0.0-next.9

### Patch Changes

- fix: externalize `@opentelemetry/api` to prevent bundler chunk
colocation between `instrumentation.server.js` and application code
([#16302](#16302))
- Updated dependencies
[[`04f9ab4`](04f9ab4),
[`1e198bd`](1e198bd),
[`813726d`](813726d),
[`a115a7b`](a115a7b),
[`031ac69`](031ac69),
[`dc7442c`](dc7442c),
[`19c4478`](19c4478),
[`dc7442c`](dc7442c),
[`dc7442c`](dc7442c),
[`0b3e2b3`](0b3e2b3)]:
  - @sveltejs/kit@3.0.0-next.19

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tee Ming <chewteeming01@gmail.com>
teemingc pushed a commit that referenced this pull request Aug 11, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to version-3, this PR
will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`version-3` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `version-3`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @sveltejs/kit@3.0.0-next.19

### Major Changes

- breaking: move `defineParams` and associated types to
`@sveltejs/kit/params`
([#16716](#16716))

- breaking: run all errors through the `handleError` hook
([#16664](#16664))

- breaking: move `Page`, `ReadonlyURL` and `ReadonlyURLSearchParams`
from `@sveltejs/kit` to `$app/state`
([#16694](#16694))

- breaking: move `BeforeNavigate`, `OnNavigate`, `AfterNavigate`,
`Navigation`, `NavigationTarget`, `NavigationType`, `GotoOptions` and
the `Navigation*` variant types from `@sveltejs/kit` to
`$app/navigation` ([#16694](#16694))

- breaking: move `ActionResult` and `SubmitFunction` from
`@sveltejs/kit` to `$app/forms`
([#16694](#16694))

- breaking: remove `handleValidationError` and pass remote function
validation errors to `handleError` with `kind: 'validation'`
([#16672](#16672))

### Minor Changes

- feat: ignore files with + prefix if they contain test/spec/stories
([#16715](#16715))

### Patch Changes

- fix: rebuild the dev manifest when route files disappear during an
incremental update
([#16643](#16643))

- fix: externalize `@opentelemetry/api` to prevent bundler chunk
colocation between `instrumentation.server.js` and application code
([#16302](#16302))

- fix: surface prerender errors during development
([#16507](#16507))

- fix: adjust error overload for optional `App.Error` parameters
([#16725](#16725))
## @sveltejs/adapter-node@6.0.0-next.9

### Patch Changes

- fix: externalize `@opentelemetry/api` to prevent bundler chunk
colocation between `instrumentation.server.js` and application code
([#16302](#16302))
- Updated dependencies
[[`04f9ab4`](04f9ab4),
[`1e198bd`](1e198bd),
[`813726d`](813726d),
[`a115a7b`](a115a7b),
[`031ac69`](031ac69),
[`dc7442c`](dc7442c),
[`19c4478`](19c4478),
[`dc7442c`](dc7442c),
[`dc7442c`](dc7442c),
[`0b3e2b3`](0b3e2b3),
[`c5d0ce2`](c5d0ce2)]:
  - @sveltejs/kit@3.0.0-next.19

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

2 participants