-
Notifications
You must be signed in to change notification settings - Fork 743
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
returning different error in -[HTTPNetworkTransportRetryDelegate networkTransport:receivedError:for:response:retryHandler] #1121
Comments
So it sounds like the error from the retry is not actually being propagated to the original call is the biggest issue here - is that correct? |
no, because my token update fails I know that there is no point in retrying, in delegate say "don't retry" - everything works correctly. |
updated ticket with code samples, maybe will be easier to understand |
would you accept such PR? |
Thanks for adding the code samples, that does help. Yeah, I think this would be reasonable. Would you like to take a stab at a PR on this? |
yes, will do that |
This has shipped with |
The problem I'm facing:
doing apolloClient.fetch()
request fails for reason Y (getting 401 to delegate)
trying to update token
token update fails for reason X
calling retryHandler(false)
request fails and callback in apolloClient.fetch() see error Y, where real error is X
What I would like to do is to modify (add new one and deprecate existing one) -[HTTPNetworkTransportRetryDelegate networkTransport:receivedError:for:response:retryHandler]
where you could return different error if you don't want to retry request
does that make sense @designatednerd or maybe there is better way to do that?
How it works now:
What I would like to do is:
I think this could be done without breaking changes by forwarding to existing method if new one is not implemented
The text was updated successfully, but these errors were encountered: