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

Allow 404 to be caught be ErrorBoundary in Route #1215

Merged
merged 2 commits into from
Aug 11, 2023

Conversation

josh-sanger
Copy link
Contributor

@josh-sanger josh-sanger commented Aug 11, 2023

WHY are these changes introduced?

Currently, (with the remix V2 v2_errorBoundary flag) when a 404 is thrown, it is not caught by the Error boundary.

Screenshot 2023-08-11 at 2 21 18 PM

WHAT is this pull request doing?

This PR adds a default exported function that returns null. This allows the ErrorBoundary in root.tsx to catch the 404 errorStatus.

Screenshot 2023-08-11 at 2 20 47 PM

HOW to test your changes?

  • run skeleton build locally
  • visit a non existing URL (e.g. localhost:3000/dsadsadsa)
  • Ensure the Error boundary is rendered

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes
  • I've added or updated the documentation

@juanpprieto juanpprieto merged commit 867866d into 2023-07 Aug 11, 2023
@juanpprieto juanpprieto deleted the josh-sanger/catch-all-fix branch August 11, 2023 18:45
FrcPpe pushed a commit to FrcPpe/hydrogen that referenced this pull request Aug 13, 2023
* Allow 404 to be caught be ErrorBoundary in Route

* Added a patch
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.

2 participants