Skip to content
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

Allow crossDomain errors to be retried (#1194) #1195

Merged
merged 2 commits into from
Mar 18, 2017

Conversation

mwolson
Copy link
Contributor

@mwolson mwolson commented Mar 18, 2017

When using the retry() functionality on a bad connection, the browser can sometimes fail during a CORS OPTIONS request, which currently doesn't get retried. Superagent throws an error with crossDomain: true property in this case. We should retry instead, since the next attempt might succeed.

@kornelski
Copy link
Contributor

Thanks.

That's a good idea. True CORS failure will be blocked quickly, so there's no harm retrying.

When using the retry() functionality on a bad connection, the browser can sometimes fail during a CORS OPTIONS request, which currently doesn't get retried. Superagent throws an error with crossDomain: true property in this case. We should retry instead, since the next attempt might succeed.
@mwolson
Copy link
Contributor Author

mwolson commented Mar 18, 2017

Added some docs for .retry() as well, since I noticed they were missing.

@kornelski kornelski merged commit acaf84d into ladjs:master Mar 18, 2017
@kornelski
Copy link
Contributor

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants