Bug 692386 - sync: Add missing requested URL on NS_ERROR_NET_RESET. r=markh
authorJeremy Lempereur <jeremy.lempereur@gmail.com>
Wed, 03 Jan 2018 12:59:03 +0100
changeset 397704 2992db73415fabdf085c452f766d54ab62603f06
parent 397703 4f37a0996fc6d1d0b6e02844714657afc39f7d52
child 397705 a05a37c15ce1a898ca71419377c2900c2eafa2b2
push id33189
push usernerli@mozilla.com
push dateThu, 04 Jan 2018 09:45:12 +0000
treeherdermozilla-central@f78a83244fbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarkh
bugs692386
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
services/sync/modules/resource.js
--- a/services/sync/modules/resource.js
+++ b/services/sync/modules/resource.js
@@ -171,16 +171,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);