-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Description
See here.
If xhr.abort() is expected to throw an exception merely because the request cannot be terminated, then instead of invoking the error callback, the success callback should be invoked with boolean false to indicate the attempt to cancel was unsuccessful.
Cancelation should be used purely to conserve resources; a user would not expect a cancellation request to fail by throwing an exception. The only reason I can think of for throwing an exception during cancellation is if the cancellation attempt itself is indicative of programmer error (e.g. cancellation was already attempted before).
Metadata
Metadata
Assignees
Labels
No labels