Skip to content

Promise is never resolved in case of server-side error when invoking Parse.Object.saveAll #494

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

Closed
nrchandan opened this issue Oct 23, 2017 · 3 comments

Comments

@nrchandan
Copy link
Contributor

We have a node process that works on multiple batches of Parse objects. Each batch is saved through Parse.Object.saveAll. However, as soon as a batch errors out, the node process stops immediately and none of the subsequent batches get processed. We found that an error handling component was missing.

Raising a PR shortly. It adds just two lines of code.

nrchandan added a commit to nrchandan/Parse-SDK-JS that referenced this issue Oct 23, 2017
nrchandan added a commit to nrchandan/Parse-SDK-JS that referenced this issue Oct 23, 2017
nrchandan added a commit to nrchandan/Parse-SDK-JS that referenced this issue Oct 23, 2017
nrchandan added a commit to nrchandan/Parse-SDK-JS that referenced this issue Oct 23, 2017
nrchandan added a commit to nrchandan/Parse-SDK-JS that referenced this issue Oct 24, 2017
nrchandan added a commit to nrchandan/Parse-SDK-JS that referenced this issue Oct 24, 2017
Also, remove two duplicate unit tests.
nrchandan added a commit to nrchandan/Parse-SDK-JS that referenced this issue Oct 24, 2017
Also, remove two duplicate unit tests.
nrchandan added a commit to nrchandan/Parse-SDK-JS that referenced this issue Oct 25, 2017
nrchandan added a commit to nrchandan/Parse-SDK-JS that referenced this issue Dec 14, 2017
@toddheslin
Copy link

@nrchandan did you open a pull request for this? I'm facing the same issue

@jaalzateolaya
Copy link

jaalzateolaya commented May 17, 2018

Why don't you just throw an exception if there is not an error handler like Promise does?

for (var i = 0; i < this._rejectedCallbacks.length; i++) {

Maybe something like this

if (this._rejectedCallbacks.length === 0) {
  throw Parse.Error (error);
}

@nrchandan
Copy link
Contributor Author

@toddheslin I'm sorry but I have moved between projects and am no longer using this library. If the workaround suggested by @alexander-alzate works for you, would you recommend closing this issue?

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

No branches or pull requests

3 participants