Skip to content

exception_handler: make swap outage errors actionable - #655

Merged
erdemyerebasmaz merged 1 commit into
mainfrom
boltz-outage-error-message
Aug 3, 2026
Merged

exception_handler: make swap outage errors actionable#655
erdemyerebasmaz merged 1 commit into
mainfrom
boltz-outage-error-message

Conversation

@erdemyerebasmaz

Copy link
Copy Markdown
Collaborator

This PR replaces a developer-facing swap error with an actionable one.

Boltz suspended its service, that's why users hit PairsNotFound on every Lightning and onchain path. Liquid needs no swapper.

Changelist:

  • exception_handler: make swap outage errors actionable 195e952

PaymentError_PairsNotFound is only produced when the swapper answers but
offers no BTC/L-BTC pair, which is exactly what a suspended swap service
looks like. Users hit it on every Lightning and onchain BTC path and saw
"Boltz did not return any pairs from the request", which gives them no way
forward. Point them at Liquid send & receive instead, which need no swapper.

Also fix the adjacent Generic branch, where the friendly broadcast message
was assigned and then unconditionally overwritten, so it never showed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@erdemyerebasmaz
erdemyerebasmaz merged commit d0ae4d8 into main Aug 3, 2026
1 check failed
erdemyerebasmaz added a commit that referenced this pull request Aug 3, 2026
)

* exception_handler: surface disabled swap creation as a swap outage

Verified against device logs: Boltz keeps its pairs endpoint live while
refusing to create swaps, so prepare_receive_payment succeeds with real
fees and limits, and the refusal only lands on receive_payment as
Generic { err: "Boltz API returned error status 400 Bad Request:
{\"error\":\"swap creation is disabled\"}" }.

Users on Receive > Bitcoin Address saw that raw JSON. PairsNotFound, which
#655 assumed was the error hit during this outage, never fires. Route both
to the same message and reuse it via a shared constant.

Matching on the error text is fragile, but the SDK flattens the Boltz 400
body into an untyped Generic error, so there is nothing else to match on.
The adjacent non-final / rpc error -26 check sets the precedent.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* bump version to 0.3.1

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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