Fix autowithdrawal error handling (#1908)

* Fix autowithdrawal error message

* Fix no error thrown if autowithdrawal failed
This commit is contained in:
ekzyis 2025-02-15 03:55:17 +01:00 committed by GitHub
parent f0d7eaf446
commit fca5193beb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -53,7 +53,9 @@ export async function autoWithdraw ({ data: { id }, models, lnd }) {
{ me: { id }, models, lnd, wallet, logger }) { me: { id }, models, lnd, wallet, logger })
} catch (err) { } catch (err) {
console.error('failed to create autowithdrawal:', err) console.error('failed to create autowithdrawal:', err)
logger?.error(`incoming payment failed: ${err}`, { bolt11: invoice }) logger?.error('incoming payment failed: ' + err.message, { bolt11: invoice })
} }
} }
throw new Error('no wallet to receive available')
} }