Skip to content

Commit

Permalink
Bug 1642866 - include details about sending the command in the log. r…
Browse files Browse the repository at this point in the history
…=rfkelly

Differential Revision: https://phabricator.services.mozilla.com/D82824
  • Loading branch information
mhammond committed Jul 9, 2020
1 parent 676e2f7 commit e660db8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion services/fxaccounts/FxAccountsCommands.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e660db8

Please sign in to comment.