Svelte: Waiting indefinitely if there is no catch block

Created on 15 Sep 2020  路  4Comments  路  Source: sveltejs/svelte

We get an infinite wait if promise rejection and there is no catch block in template.
Svelte version 3.25.0
REPL: https://svelte.dev/repl/791ef575157744ca95fc53c867048c2e?version=3.25.0

But in svelte version 3.24.1 is everything works.
REPL: https://svelte.dev/repl/aafb907381524e5db23c1ae7f2c94b8f?version=3.24.1

The documentation says the catch block is optional https://svelte.dev/docs#await

await bug

Most helpful comment

All 4 comments

Presumably the result of #5149 - I'm guessing there were other effects to rethrowing the error, but I haven't looked into this yet.

Checking the console, it seems like the error is thrown and since it was unhandled, the content in await block is shown. Shouldn't this be the expected behaviour?

We can't satisfy both #5129 and this right?

No, we can still re-throw/re-emit the unhandled rejection after we update the DOM. That feature request was just that there be an unhandled rejection to listen for globally.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

plumpNation picture plumpNation  路  3Comments

matt3224 picture matt3224  路  3Comments

sskyy picture sskyy  路  3Comments

mmjmanders picture mmjmanders  路  3Comments

angelozehr picture angelozehr  路  3Comments