-
Notifications
You must be signed in to change notification settings - Fork 36
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
Error handling with PreloadQuery #393
Comments
As that query finishes after your page has already partially rendered, it's probably not possible to do this on the server during RSC or SSR. Your only chance is to do this in the browser, and if a server query failed, the browser will always try to restart it there - the error itself is currently not transported over (that will change for |
Thanks for the reply. I understood you. The only thing I would like to know is how you estimate how long you will do the work #389, so that I will set a reminder to return to this problem. |
It's very high on my list of priorities, but even more important things keep popping up. |
Thank you very much. |
I will close the issue while waiting for the implementation of the necessary feature |
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better. |
Hello. Tell me how to correctly handle query error a type of
GraphQLFormattedError
. I preload user data usingPreloadQuery
, the correctness of the request depends on cookies, but if for some reason the cookies turn out to be incorrect, the error401 Forbidden
is returned. When I received this error, I wanted to redirect to the authorization page. I've tried several ways:PreloadQuery
component, except for theerrorPolicy="all"
parameter, but thenuseSuspenseQuery
tries to make a repeat request, which I would like to avoid;Error: NEXT_REDIRECT
.The text was updated successfully, but these errors were encountered: