X-Git-Url: http://git.squeep.com/?p=squeep-indieauth-helper;a=blobdiff_plain;f=lib%2Fcommunication.js;fp=lib%2Fcommunication.js;h=2bda4ce2307dc0b026ba3975e65d0f56a936b940;hp=7a9f6e318f4675a560f0714a0fb7efd1470e4998;hb=c19884baf6ee98330ffa45b086d35e5e98885e8e;hpb=5875c4885d32213d3cc140a55b54856fe3b72416 diff --git a/lib/communication.js b/lib/communication.js index 7a9f6e3..2bda4ce 100644 --- a/lib/communication.js +++ b/lib/communication.js @@ -62,7 +62,7 @@ class Communication { }, hooks: { beforeRetry: [ - this._onRetry, + this._onRetry.bind(this), ], }, }); @@ -899,7 +899,9 @@ class Communication { ...( issuerUrlObj && { iss: issuerUrlObj.href }), }, }; - return await this.got(ticketConfig); + const result = await this.got(ticketConfig); + this.logger.debug(_scope, 'success', { ...common.gotResponseLogData(result) }); + return result; } catch (e) { this.logger.error(_scope, 'ticket delivery request failed', { error: e, url: ticketEndpointUrlObj.href }); throw e;