Skip to content

investigate cancellation #20

@jdegoes

Description

@jdegoes

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions