Skip to content

Commit 3f385d4

Browse files
committed
Fix #494: Reject a promise on error condition
1 parent f713a2c commit 3f385d4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ParseObject.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,6 +1847,8 @@ var DefaultController = {
18471847
}, options);
18481848
}).then((response, status, xhr) => {
18491849
batchReturned.resolve(response, status);
1850+
}, (error) => {
1851+
batchReturned.reject(new ParseError(error.message));
18501852
});
18511853

18521854
return ParsePromise.when(batchTasks);

0 commit comments

Comments
 (0)