Skip to content

Remote function error, crashes the app entirely #14932

@neo-noire

Description

@neo-noire

Describe the bug

I see some examples of how to get derived results from remote functions in docs:

const post = $derived(await getPost(params.slug));

Also it's shown that you can error inside of remote functions:

export const getPost = query(async () => {
    //something happens
    error(404, 'Not found');
});

And for some reason, when it happens,svelte boundary is not helpful, it just crashes the app with:

ERR_UNHANDLED_REJECTION

I’ve seen similar issues before, but those issues were about boundary not catching error, and it was fall to root error . But this issue seems to be new one, as it’s crashing app entirely.

Reproduction

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

Logs

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 20.19.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    svelte: ^5.43.6 => 5.43.8

Severity

blocking all usage of SvelteKit

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions