You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if there's a way to reject requests. I want to implement a jwt token refreshing method. I want to cancel a request if the token is missing or expired. I want to throw a custom error in the willSendRequest delegate method but I found that performRequest tries to cast the thrown error as DataLoaderError and after that calls the other delegate method shouldRetry. This way I cannot throw a custom error, but I also haven't found a way to throw DataLoaderError neither.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I was wondering if there's a way to reject requests. I want to implement a jwt token refreshing method. I want to cancel a request if the token is missing or expired. I want to throw a custom error in the
willSendRequestdelegate method but I found thatperformRequesttries to cast the thrown error asDataLoaderErrorand after that calls the other delegate methodshouldRetry. This way I cannot throw a custom error, but I also haven't found a way to throwDataLoaderErrorneither.Beta Was this translation helpful? Give feedback.
All reactions