Skip to content

Remote function form enhance submit function does not throw error on client side #15148

Description

@feroxbyte

Describe the bug

The submit() function returned by form.enhance() never throws/rejects when invalid is used. This makes try/catch unusable for error handling. submit() always resolves.

Reproduction

https://stackblitz.com/edit/sveltejs-kit-template-default-mjwi8p4r?file=src%2Froutes%2F%2Bpage.svelte

Logs

System Info

System:
    OS: macOS 15.6.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 74.75 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 24.11.1 - /Users/batuhandemir/.nvm/versions/node/v24.11.1/bin/node
    npm: 11.6.2 - /Users/batuhandemir/.nvm/versions/node/v24.11.1/bin/npm
    pnpm: 10.24.0 - /Users/batuhandemir/Library/pnpm/pnpm
    bun: 1.1.29 - /Users/batuhandemir/.bun/bin/bun
  Browsers:
    Brave Browser: 143.1.85.118
    Chrome: 143.0.7499.170
    Firefox: 144.0.2
    Safari: 18.6
  npmPackages:
    @sveltejs/adapter-node: ^5.4.0 => 5.4.0 
    @sveltejs/kit: ^2.49.4 => 2.49.4 
    @sveltejs/vite-plugin-svelte: ^6.2.4 => 6.2.4 
    svelte: ^5.46.1 => 5.46.1 
    vite: ^7.3.1 => 7.3.1

Severity

annoyance

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions