Skip to content

fix(invoices): preserve Lightning Address error messages instead of generic catch-all#147

Merged
andrerfneves merged 1 commit into
mainfrom
maintenance/fix-lightning-address-error-20260605
Jun 12, 2026
Merged

fix(invoices): preserve Lightning Address error messages instead of generic catch-all#147
andrerfneves merged 1 commit into
mainfrom
maintenance/fix-lightning-address-error-20260605

Conversation

@andrerfneves

Copy link
Copy Markdown
Owner

Summary

The handleLightningAddress catch block was swallowing all errors and returning the same misleading message regardless of the actual failure cause.

Problem

  • Network errors, CORS failures, JSON parse errors, and HTTP errors all produced: "This identifier does not support Lightning Address yet."
  • This was misleading because the error could be a temporary network issue, not a missing Lightning Address implementation.

Changes

  • Preserve the original error.message in the catch block
  • Fall back to "Could not resolve Lightning Address." when the message is empty
  • Update test expectation to match actual error propagation

Verification

  • All 52 tests pass
  • npm run build completes successfully
  • No application behavior changes beyond more accurate error messages

…eneric catch-all

The handleLightningAddress catch block was swallowing all errors and returning
'This identifier does not support Lightning Address yet.' for every failure
including network errors, CORS failures, JSON parse errors, and HTTP errors.

This was misleading because users would see the same message regardless of
whether the domain had no Lightning Address support or the service was simply
temporarily unreachable.

Changes:
- Preserve the original error.message in the catch block
- Fall back to 'Could not resolve Lightning Address.' when message is empty
- Update test expectation to match actual error propagation
@vercel

vercel Bot commented Jun 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lightning-decoder Ready Ready Preview, Comment Jun 5, 2026 4:07am

@andrerfneves andrerfneves merged commit 949dae3 into main Jun 12, 2026
4 checks passed
@andrerfneves andrerfneves deleted the maintenance/fix-lightning-address-error-20260605 branch June 12, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant