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

[Nextjs] Better error handling for component-level data fetching #1586

Merged
merged 3 commits into from
Aug 15, 2023

Conversation

illiakovalenko
Copy link
Contributor

@illiakovalenko illiakovalenko commented Aug 11, 2023

Description / Motivation

Previously, if an error was thrown in component-level getStatic/ServerSideProps, it was swallowed and the page was rendered without the specific component.

  • This PR provides better error handling, it will throw an error by accumulating all the component-level errors
  • Added componentName in the error log for a better understating of the root cause

Testing Details

  • Unit Test Added
  • Manual Test/Other - connected, production modes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@illiakovalenko illiakovalenko changed the title [Nextjs] Page getStatic/ServerSideProps should fail if component level data fetching fails [Nextjs] Better error handling for component-level data fetching Aug 11, 2023
@illiakovalenko illiakovalenko requested a review from a team August 11, 2023 11:09
Copy link
Contributor

@art-alexeyenko art-alexeyenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good

@ambrauer ambrauer merged commit 9050b95 into dev Aug 15, 2023
@ambrauer ambrauer deleted the feature/JSS-96 branch August 15, 2023 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants