Bug 692386 - sync: Add missing requested URL on NS_ERROR_NET_RESET. r=markh
The requested URL was logged on almost each failing request exception.
Added a warn message to log the request method and url when any request fails.
MozReview-Commit-ID: GKwd7HabTp6
--- a/services/sync/modules/resource.js
+++ b/services/sync/modules/resource.js
@@ -166,16 +166,17 @@ Resource.prototype = {
didTimeout = true;
this._log.error(`Request timed out after ${this.ABORT_TIMEOUT}ms. Aborting.`);
controller.abort();
}, this.ABORT_TIMEOUT);
let response;
try {
response = await responsePromise;
} catch (e) {
+ this._log.warn(`${method} request to ${this.uri.spec} failed`, e);
if (!didTimeout) {
throw e;
}
throw Components.Exception("Request aborted (timeout)", Cr.NS_ERROR_NET_TIMEOUT);
} finally {
clearTimeout(timeoutId);
}
return this._processResponse(response, method);