Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

handle aborted requests in http/error.ts #2264

Merged
merged 2 commits into from
Apr 27, 2016
Merged

Conversation

xi
Copy link
Collaborator

@xi xi commented Apr 26, 2016

AJAX requests can be aborted, either explicitly (by calling request.abort()), by a firewall or browser extension, or because the user navigated away. In this case the request data is null and status is 0 (even though I also saw -1 in the wild). spec.

Our error handling code expected data to have a specific form, so it broke when a request was aborted and data was consequently null. I fixed that.

This is somehow related to #2263 because I think it is caused by aborted requests. This does not fix that issue, though.

@xi xi added the frontend label Apr 26, 2016
@der-john
Copy link

looks good & improves error messaging. no additional tests failing.

@der-john der-john merged commit 2e9329e into master Apr 27, 2016
@joka joka deleted the 2016-04-tb-refactor-error branch February 3, 2018 22:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants