-
Notifications
You must be signed in to change notification settings - Fork 2
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
SFR-2136: Implement error boundary #522
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
The change looks good. Should the error boundary work for all uncaught exceptions? When running locally and navigating to http://localhost:3000/edition/1 I see the following:
|
After running npm i; npm run build; and npm run start everything looks good! |
@kylevillegas93 React's error boundary only catches errors during component renders, things like a failed fetch request or syntax errors within the component itself, and doesn't catch routing level errors so this should be fine. However, I believe this could still be a bug where an invalid URL should show the 404 page in the pages/404.tsx instead of a generic 404 page from the browser, what do you think? @jackiequach |
@Toxiapo Kyle and I spoke offline about this. The API files need to be updated to properly throw the correct status code and will be addressed in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@jackiequach, this isn't directly related to this PR, but I noticed a small UI bug. When searching for a book, the skeleton loader seems to cover the whole screen, which makes it look like the page is broken. Thought I'd mention it! |
Jira Ticket
This PR does the following:
Testing requirements & instructions: