mirror of
https://github.com/zotero/zotero.git
synced 2026-10-04 02:31:47 +00:00
Pass URL to Zotero.HTTP.UnexpectedStatusException
This allows the URL to be retrieved at .url in the thrown error.
This commit is contained in:
parent
b25d2d9c56
commit
536c07e9f4
1 changed files with 3 additions and 2 deletions
|
|
@ -9,8 +9,9 @@ Zotero.HTTP = new function() {
|
|||
* Exception returned for unexpected status when promise* is used
|
||||
* @constructor
|
||||
*/
|
||||
this.UnexpectedStatusException = function(xmlhttp, msg) {
|
||||
this.UnexpectedStatusException = function (xmlhttp, url, msg) {
|
||||
this.xmlhttp = xmlhttp;
|
||||
this.url = url;
|
||||
this.status = xmlhttp.status;
|
||||
this.channelStatus = null;
|
||||
this.responseStatus = null;
|
||||
|
|
@ -372,7 +373,7 @@ Zotero.HTTP = new function() {
|
|||
}
|
||||
}
|
||||
|
||||
deferred.reject(new Zotero.HTTP.UnexpectedStatusException(xmlhttp, msg));
|
||||
deferred.reject(new Zotero.HTTP.UnexpectedStatusException(xmlhttp, url, msg));
|
||||
}
|
||||
}.bind(this);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue