Better debug output for a few ZFS errors
This commit is contained in:
parent
0d13147704
commit
37e4d8962e
1 changed files with 11 additions and 6 deletions
|
@ -93,8 +93,10 @@ Zotero.Sync.Storage.Session.ZFS.prototype._getStorageFileInfo = function (item,
|
|||
return;
|
||||
}
|
||||
else if (req.status != 200) {
|
||||
var msg = "Unexpected status code " + req.status + " in " + funcName;
|
||||
Zotero.debug(msg + " (" + Zotero.Items.getLibraryKeyHash(item) + ")", 1);
|
||||
Zotero.debug(req.responseText);
|
||||
self.onError("Unexpected status code " + req.status + " in " + funcName);
|
||||
self.onError(msg);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -485,8 +487,10 @@ Zotero.Sync.Storage.Session.ZFS.prototype._getFileUploadParameters = function (i
|
|||
return;
|
||||
}
|
||||
else if (req.status != 200) {
|
||||
var msg = "Unexpected status code " + req.status + " in " + funcName;
|
||||
Zotero.debug(msg + " (" + Zotero.Items.getLibraryKeyHash(item) + ")", 1);
|
||||
Zotero.debug(req.responseText);
|
||||
self.onError("Unexpected status code " + req.status + " in " + funcName);
|
||||
self.onError(msg);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -668,11 +672,12 @@ Zotero.Sync.Storage.Session.ZFS.prototype._onUploadComplete = function (httpRequ
|
|||
|
||||
// Register upload on server
|
||||
Zotero.Utilities.HTTP.doPost(uri, body, function (req) {
|
||||
Zotero.debug(req.responseText);
|
||||
|
||||
if (req.status != 204) {
|
||||
self.onError("Unexpected file registration status " + status
|
||||
+ " in Zotero.Sync.Storage._onUploadComplete()");
|
||||
var msg = "Unexpected file registration status " + status
|
||||
+ " in Zotero.Sync.Storage._onUploadComplete()";
|
||||
Zotero.debug(msg + " (" + Zotero.Items.getLibraryKeyHash(item) + ")", 1);
|
||||
Zotero.debug(req.responseText);
|
||||
self.onError(msg);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue