You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>
{#awaitPromise.reject()}
Loading...
{:then_}
Loaded
{/await}
{#snippetfailed()}
An error has occurred
{/snippet}
</svelte:boundary>
If there is a {:catch} on the block, that should not propagate up the boundary.
<svelte:boundary>
{#awaitPromise.reject() then_}
Loading...
{:then_}
Loaded
{:catch}
This error should be displayed
{/await}
{#snippetfailed()}
This error should not be shown
{/snippet}
</svelte:boundary>
Importance
would make my life easier
The text was updated successfully, but these errors were encountered:
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:If there is a
{:catch}
on the block, that should not propagate up the boundary.Importance
would make my life easier
The text was updated successfully, but these errors were encountered: