Open
Description
Describe the problem
I have a <svelte:boundary>
in my code for catching some potential issues. Inside of that is an {#await}
that, since it hits the network, always has a chance to fail. I would like the display and handling of these two error conditions to be the same, but there's no good way to trigger the boundary when a promise fails.
Describe the proposed solution
I would like svelte:boundary
to also catch errors in promises. Currently, this just renders blank:
<svelte:boundary>
{#await Promise.reject()}
Loading...
{:then _}
Loaded
{/await}
{#snippet failed()}
An error has occurred
{/snippet}
</svelte:boundary>
If there is a {:catch}
on the block, that should not propagate up the boundary.
<svelte:boundary>
{#await Promise.reject() then _}
Loading...
{:then _}
Loaded
{:catch}
This error should be displayed
{/await}
{#snippet failed()}
This error should not be shown
{/snippet}
</svelte:boundary>
Importance
would make my life easier
Metadata
Metadata
Assignees
Labels
No labels