mirror of
https://github.com/Routstr/routstr-core.git
synced 2026-10-06 12:38:23 +00:00
Lightning invoice errors now use the {"error": {message, type, code}}
envelope the proxy and chat-completion paths already return, with codes
specific to this path: topup_authorization_required,
topup_invalid_api_key_format, topup_api_key_not_found, invoice_not_found,
invalid_invoice_amount, invoice_creation_failed.
Invoice creation no longer collapses every failure into a 500 — an
unreachable or rate-limited mint now returns 503 with
lightning_mint_unreachable / lightning_mint_rate_limited, and a bad amount
returns 400.
Note: `detail` changes from a string to an object on these endpoints, so
clients reading it as text (including ui/lib/api/errors.ts) need updating.