Skip to content

Calling .catch() on remote functions causes them to return undefined #14486

@hmnd

Description

@hmnd

Describe the bug

When .catch() is called on a remote function, the function returns undefined when awaited instead of the actual returned value.

Reproduction

https://github.com/hmnd/sveltekit-rpc-catch-repro

Logs

System Info

System:
    OS: Linux 6.16 Fedora Linux 42 (KDE Plasma Desktop Edition)
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 11.00 GB / 31.08 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 24.4.1 - ~/.local/share/mise/installs/node/24.4.1/bin/node
    npm: 11.4.2 - ~/.local/share/mise/installs/node/24.4.1/bin/npm
    pnpm: 10.16.1 - ~/.local/share/pnpm/pnpm
    bun: 1.2.21 - ~/.local/share/mise/installs/bun/1.2.21/bin/bun
  Browsers:
    Chrome: beta
  npmPackages:
    @sveltejs/adapter-auto: ^6.0.0 => 6.1.0
    @sveltejs/kit: ^2.22.0 => 2.42.2
    @sveltejs/vite-plugin-svelte: ^6.0.0 => 6.2.0
    svelte: ^5.0.0 => 5.39.3
    vite: ^7.0.4 => 7.1.6

Severity

serious, but I can work around it

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