beignet 0.6.8 → 0.6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -449,6 +449,7 @@ class BeignetNode extends events_1.EventEmitter {
449
449
  this.log('warn', 'Payment failed', {
450
450
  paymentHash: pi.paymentHash,
451
451
  failureCode: pi.failureCode,
452
+ ...(info.failureReason ? { reason: info.failureReason } : {}),
452
453
  ...this.describeFailureSource(info)
453
454
  });
454
455
  this.emit('payment:failed', pi);
@@ -2433,6 +2434,9 @@ class BeignetNode extends events_1.EventEmitter {
2433
2434
  info.failureCode = p.failureCode;
2434
2435
  info.failureDescription = (0, errors_1.describeFailureCode)(p.failureCode);
2435
2436
  }
2437
+ else if (p.failureReason) {
2438
+ info.failureDescription = p.failureReason;
2439
+ }
2436
2440
  if (p.route?.totalFeeMsat !== undefined) {
2437
2441
  info.feeSats = Number(p.route.totalFeeMsat / 1000n);
2438
2442
  }