Replies: 1 comment 1 reply
-
I am having the exact same problem. Did you come up with a solution? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I would like to ask if anyone has any advice on handling errors in resource routes.
I have the following router in my resource route
myRoute.myData[.xlsx].tsx
(with dummy functions).To access the resource route from the parent route
myRoute.myData.tsx
, I am using the followingLink
I have tried to add an
ErrorBoundary
in the resource route, but I realized that doing so will cause the resource route to return an empty component, which is not desired.Something else that I've attempted was to return the error in a JSON payload as recommended here
I have also tried to add the
ErrorBoundary
in the parent route, but it does not catch the Errors that I am throwing.Resource Route:
myRoute.myData[.xlsx].tsx
(Attempt 1) Parent Route:
myRoute.myData.tsx
(Attempt 2) Parent Route:
myRoute.tsx
Below the ErrorBoundary that I am using, obtained from here
May I ask if there is a proper way of handling errors for resource routes? I am unable to find any examples on this in the Remix Documentation. Thank you very much in advance!
Beta Was this translation helpful? Give feedback.
All reactions