-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When a file cannot be uploaded (e.g. becase it does not exist), report the error via callback/promise. Before this change, FormData errors were reported via "error" event on the request. In promise mode, such error was caught by `.then()` handler in a way that shadowed the actual error reported by `.end()`. In callback mode, such error was not caught at all and crashed the process on an unhandled error. With this change in place, FormData errors finish the request and pass the error directly to the callback.
- Loading branch information
Showing
3 changed files
with
39 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters