feat!: absorb the gateway's breaking batch - #23
Merged
Conversation
Closes #21. THE ERROR SHAPE (gateway #252). A body is exactly code/title/detail: `status`, `message` and Grape's `error` were DELETED rather than dual-sent, so `body[:code] || body[:error] || body[:status]` and its detail twin were chains whose later terms cannot arrive. Each collapses to the one field the gateway sends; the bare HTTP status stays as the last resort for a body with no text at all. SIWE hints for the four binding failures split out of signer_mismatch (#216), plus sessions_revoked. None names the server's expectation — that endpoint is unauthenticated, so echoing the allow-list or the expected chain id would make each hint a probe. `escrow_stranded` / `escrow_returnable_at` on the payment (#233): the window after a partial capture where neither void nor release can return the remaining escrow. `expired` documented in the README status list, with the part that matters: it is NOT terminal. Release still works from it, so code that treats it as closed leaves the buyer's funds in escrow. Four specs changed rather than deleted. One asserted the OPPOSITE of the new behaviour — that an older gateway's aliases still surfaced — and now pins what actually matters: a body carrying only the deleted keys must yield NO code, because a silent "" would be branched on as if it were a real condition. 166 examples green, rubocop clean. Co-Authored-By: Claude Fable 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.
Closes #21.
The error shape (gateway#252): a body is exactly
code/title/detail, withstatus,messageand Grape'serrordeleted rather than dual-sent — so both fallback chains had later terms that cannot arrive.Also: SIWE binding hints (#216),
escrow_stranded/escrow_returnable_at(#233), andexpiredin the README's status list — documented as not terminal, since release still works from it.One spec asserted the opposite of the new behaviour (that an older gateway's aliases still surfaced). It now pins what matters instead: a body carrying only the deleted keys yields no code, because a silent
""would be branched on as a real condition.166 examples green, rubocop clean. Group C of #21 stands, with the topics exception recorded in a comment there and already landed via #22.
🤖 Generated with Claude Code