exception_handler: make swap outage errors actionable - #655
Merged
Conversation
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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR replaces a developer-facing swap error with an actionable one.
Boltz suspended its service, that's why users hit
PairsNotFoundon every Lightning and onchain path. Liquid needs no swapper.Changelist: