diff --git a/core/api/src/services/lnd/errors.ts b/core/api/src/services/lnd/errors.ts index e115c5f641..2062563d5f 100644 --- a/core/api/src/services/lnd/errors.ts +++ b/core/api/src/services/lnd/errors.ts @@ -23,6 +23,7 @@ export const KnownLndErrorDetails = { MissingDependentFeature: /missing dependent feature/, FeaturePairExists: /feature pair exists/, InvoiceAmountTooLarge: /invoice amount .* BTC is too large/, + UnsupportedPaymentFeature: /UnsupportedPaymentFeatureInPayRequest/, // On-chain InsufficientFunds: /insufficient funds available to construct transaction/, diff --git a/core/api/src/services/lnd/index.ts b/core/api/src/services/lnd/index.ts index 1a55ff8b3a..df117af0ee 100644 --- a/core/api/src/services/lnd/index.ts +++ b/core/api/src/services/lnd/index.ts @@ -1208,6 +1208,7 @@ const handleSendPaymentLndErrors = ({ case match(KnownLndErrorDetails.InsufficientBalanceToAttemptPayment): return new InsufficientBalanceForLnPaymentError() case match(KnownLndErrorDetails.FeaturePairExists): + case match(KnownLndErrorDetails.UnsupportedPaymentFeature): return new InvalidFeatureBitsForLndInvoiceError() case match(KnownLndErrorDetails.InsufficientFee): return new InsufficientFeeForLnPaymentError() @@ -1264,6 +1265,7 @@ const handleCommonRouteNotFoundErrors = (err: Error | unknown) => { return new DestinationMissingDependentFeatureError() case match(KnownLndErrorDetails.FeaturePairExists): + case match(KnownLndErrorDetails.UnsupportedPaymentFeature): return new InvalidFeatureBitsForLndInvoiceError() default: