-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Bug: Unhandled promise rejection. Deferred response and redirects #12569
Bug: Unhandled promise rejection. Deferred response and redirects #12569
Conversation
…r if a loader has issued a redirect response
|
Hi @thomaswelton, Welcome, and thank you for contributing to React Router! Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once. You may review the CLA and sign it by adding your name to contributors.yml. Once the CLA is signed, the If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at [email protected]. Thanks! - The Remix team |
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
…n#12573) * thomasgauvin: add documentation on how to contribute to the developer docs * Update contributors.yml * Simplify docs contributing instructions --------- Co-authored-by: Brooks Lybrand <[email protected]>
…emix-run#12592) * Update spa.md to include more details about generating the index.html * Update docs/how-to/spa.md --------- Co-authored-by: Brooks Lybrand <[email protected]>
…`.gitignore` (remix-run#12591) * ignore .react-router * decorate with note * Update contributors.yml --------- Co-authored-by: harshslated <[email protected]>
* docs: sessions and cookies * Fix variable shadowing in example
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* docs (special-files): fix typo * Update contributors.yml
…emix-run#12618) * docs: Added guide on combining `configure routes` and `file routes` * Update docs/start/framework/routing.md --------- Co-authored-by: Brooks Lybrand <[email protected]>
…un#12625) * docs: add explanation of `ignoredRouteFiles` option to guide * Update docs/how-to/file-route-conventions.md --------- Co-authored-by: Brooks Lybrand <[email protected]>
These should appear both in VS Code and other IDEs, as well as in the reference docs website.
* Add HydrateFallback to the data-loading doc * introduce HydrateFallback earlier and simplify the final example * Add client data how-to * Update "See also" section
Closing since this was provided in a more succinct example in #12764 |
Added a failing test for remix-run/remix#10313
Bug Description
Remix server will crash due to an unhandled promise rejection if a loader returns a rejected promise and another part of the application has already issued a redirect response.
Test description
Fictional application that will list users of different organisations. The route
/organizations/meta/users
defined aswill display the organisation name in the parent
routes/organizations.tsx
and then show a list of users in an outlet fromroutes/organization-users.tsx
.If the user promise fails then this error is handled by the
Await
component and an error message is shown. This can be shown by visiting this organisation/organizations/justpark/users
The error will occur when visiting an organisation where the parent issues a redirect response. Visiting this page
/organizations/facebook/users
will successfully issue a redirect to themeta
organisation, but then the server will crash due to the rejected promise from the users loader.