`xhr.abort()` calls the error handler. I moved them there because I think it was more ordered like this.