Skip to content

docs: cashu error handling plan#1118

Draft
orveth wants to merge 1 commit into
masterfrom
docs/cashu-error-handling-plan
Draft

docs: cashu error handling plan#1118
orveth wants to merge 1 commit into
masterfrom
docs/cashu-error-handling-plan

Conversation

@orveth

@orveth orveth commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Plan for general cashu MintOperationError handling across send / receive / swap / melt: a trust-the-spec-codes classifier sorting errors into 4 flow-agnostic buckets (transient / permanent / already-resolved / unhandled), service-level refinement of the coarse bucket with operation context, and 2 hard rules (trust the codes, money-safety first). Split into 4 independently reviewable + shippable phases, with money-safety guards on the swap restore paths.

Supersedes #1104.

Draft for team review.

@vercel

vercel Bot commented Jun 1, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
agicash Ready Ready Preview, Comment Jun 5, 2026 10:17pm

Request Review

@supabase

supabase Bot commented Jun 1, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project hrebgkfhjpkbxpztqqke because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.


## 5. Relationship to #1115

#1115 (open draft) is the **first transient instance**: it adds `isTransientCashuSwapError` (11004/11002 → `ConcurrencyError`) and rewires the two swap-task mutations. Recommended order: **#1115 merges first** (ships the urgent prod crash fix now), then **Phase 2 generalizes it** — `classify()` subsumes `isTransientCashuSwapError`, so Phase 2 deletes the bespoke predicate and routes through the classifier. (Avoids blocking the crash fix on the full build.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can supersede this PR with the ideal solution

Co-Authored-By: Claude Opus 4.8 (1M context) <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.

2 participants