From e660db877a4ebc05c892f157f9e3d10fe242465a Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Thu, 9 Jul 2020 05:12:22 +0000 Subject: [PATCH] Bug 1642866 - include details about sending the command in the log. r=rfkelly Differential Revision: https://phabricator.services.mozilla.com/D82824 --- services/fxaccounts/FxAccountsCommands.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/services/fxaccounts/FxAccountsCommands.js b/services/fxaccounts/FxAccountsCommands.js index 9f73befbdbfb..625fbd41463e 100644 --- a/services/fxaccounts/FxAccountsCommands.js +++ b/services/fxaccounts/FxAccountsCommands.js @@ -76,7 +76,17 @@ class FxAccountsCommands { ); } try { - await client.invokeCommand(sessionToken, command, device.id, payload); + let info = await client.invokeCommand( + sessionToken, + command, + device.id, + payload + ); + if (!info.enqueued || !info.notified) { + log.warn("Sending was only partially successful", info); + } else { + log.info("Successfully sent", info); + } } catch (err) { if (err.code && err.code === 429 && err.retryAfter) { this._invokeRateLimitExpiry = Date.now() + err.retryAfter * 1000;