Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Waiting indefinitely if there is no catch block #5401

Closed
ruslan-khomiak opened this issue Sep 15, 2020 · 4 comments · Fixed by #5402
Closed

Waiting indefinitely if there is no catch block #5401

ruslan-khomiak opened this issue Sep 15, 2020 · 4 comments · Fixed by #5402
Labels

Comments

@ruslan-khomiak
Copy link

ruslan-khomiak commented Sep 15, 2020

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

@Conduitry
Copy link
Member

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

@irshadshalu
Copy link
Contributor

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?

@Conduitry
Copy link
Member

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.

@Conduitry
Copy link
Member

This is fixed in 3.25.1 - https://svelte.dev/repl/791ef575157744ca95fc53c867048c2e?version=3.25.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants