-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
Promise is never resolved when a server is down #1417
Comments
Thanks for opening this issue!
|
What would be the expectation? To reject the promise after a timeout? I would assume the JS SDK already has a retry/timeout mechanism in place in case of bad network connection. |
Yep, I think we should make a few retries (if I remember 5 by default) but after the promise should be rejected. I think it related with if (xhr.readyState !== 4 || handled || xhr._aborted) {
promise.reject(xhr);
} |
Sounds reasonable. Do you think you can submit a PR with a test and a fix for this? |
Yep. I'll try to do it today |
Hi, @mtrezza! |
Sure, feel free to request a review inside the PR anytime. |
New Issue Checklist
Issue Description
The Promise from RESTController will never resolved when a server is down.
Steps to reproduce
Set some wrong URL as parse server url ,
parse.serverURL = 'https://some-wrong-site.com'
Call
Actual Outcome
The promise will never resolve.
Expected Outcome
The promise should be rejected.
Environment
Client
3.3.1
The text was updated successfully, but these errors were encountered: