Friendlier error message for HTTP timeout, in case it's exposed

This should overridden in checkError() with a localized string,
but for now use a nicer default message.
This commit is contained in:
Dan Stillman 2019-10-14 01:46:32 -04:00
parent 85a9acd403
commit 6b2c3f2488

View file

@ -87,7 +87,7 @@ Zotero.HTTP = new function() {
this.CancelledException.prototype = Object.create(Error.prototype);
this.TimeoutException = function(ms) {
this.message = "XMLHttpRequest has timed out" + (ms ? ` after ${ms} ms` : "");
this.message = "Request timed out" + (ms ? ` after ${ms} ms` : "");
this.stack = new Error().stack;
};
this.TimeoutException.prototype = Object.create(Error.prototype);