Skip to content

svelte:boundary does not catch errors inside async component scripts #16520

@santiagocezar

Description

@santiagocezar

Describe the bug

i'm using the experimental async feature, svelte:boundary does catch errors when using {await ...} in the markup, but it doesn't if the await is inside the component's script tag.

Reproduction

https://svelte.dev/playground/4bea921679af4be984e73bf9f38c804c?version=latest

Logs

Uncaught (in promise) failed to fetch data (in component script)

System Info

System:
    OS: Linux 6.15 Fedora Linux 42 (Toolbx Container Image)
    CPU: (16) x64 AMD Ryzen 7 7730U with Radeon Graphics
    Memory: 3.77 GB / 14.96 GB
    Container: Yes
    Shell: 5.2.37 - /usr/bin/bash
  Binaries:
    Node: 22.17.0 - /usr/bin/node
    pnpm: 10.9.0 - /usr/bin/pnpm
    bun: 1.2.19 - /usr/local/bin/bun
  npmPackages:
    svelte: ^5.37.1 => 5.37.1

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions