Skip to content

Conversation

@peteclark82
Copy link

@peteclark82 peteclark82 commented Feb 6, 2023

If an async component throws a template rendering error whilst another async component is being rendered it results in a unhandled promise rejection and the server crashing. This is because the async components are processed in a synchronous loop (via unrollBuffer) creating this race condition.

Much like if there are prefetches, we must explicitly add error handling to the promise. We are still returning the original promise so that the error handling hooks can still process the error correctly.

@peteclark82 peteclark82 changed the title fix (server-renderer): stop server crashing with unhandled promise rejection fix (server-renderer): stability - stop server crashing with unhandled promise rejection Feb 7, 2023
@edison1105 edison1105 added ready to merge The PR is ready to be merged. scope: ssr 🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. labels Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. ready to merge The PR is ready to be merged. scope: ssr

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

3 participants