feat: show zap request failure reason

This commit is contained in:
codytseng
2025-09-28 23:00:29 +08:00
parent 80a9b8a34d
commit 520649e862

View File

@@ -91,9 +91,9 @@ class LightningService {
if (zapRequestResBody.error) {
throw new Error(zapRequestResBody.message)
}
const { pr, verify } = zapRequestResBody
const { pr, verify, reason } = zapRequestResBody
if (!pr) {
throw new Error('Failed to create invoice')
throw new Error(reason ?? 'Failed to create invoice')
}
if (this.provider) {