fix(errors): a bare forbidden is not about payers - #25
Merged
Conversation
The hint read "on create the payer must be the signed-in address" for every 403 forbidden the gateway sends. It describes a rule that no longer exists there: grepping the gateway for it returns nothing. The gateway split the party-mismatch 403s into codes of their own — not_the_payee, not_the_payer, wallet_deactivated, not_your_account — because they need separate fixes, and its own catalogue has read generically ever since. This entry kept the pre-split sentence. Three sites answer a bare forbidden, none about payers: the operator grant, a webhook owned by another account, and a transaction signed by a party the operation does not allow. The first sends NO detail, deliberately — so this hint is the only thing its caller reads, and an admin whose grant lapsed was told to check the payer address.
It asserted the forbidden hint includes "payer", under the title "explains what forbidden usually means on create" — so the stale wording had a guard holding it in place, which is why it survived the gateway splitting those 403s into codes of their own. Now it asserts what a bare forbidden actually is, and adds the negative: the hint must NOT mention a payer. That is the sentence that crept in and stayed, so it is the one worth guarding against. Mea culpa on the CI failure: I ran `ruby -c` and rubocop on the file I changed and not the suite, which is exactly where a spec pinning the old copy would speak up.
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.
A bare
forbiddenwas telling every caller about payment creation:It describes a rule that no longer exists
The gateway split the party-mismatch 403s into codes of their own —
not_the_payee,not_the_payer,wallet_deactivated,not_your_account— because, in its own words, "they need separate fixes: sign in as the other party, switch account, or stop calling that endpoint at all."Its catalogue has read generically ever since: "This session is not allowed to perform that operation." The SDKs kept the pre-split sentence. Grepping the gateway for the rule this hint names returns nothing — it is not merely over-specific, it is stale.
What a bare forbidden actually is
Three sites, none of them about payers:
require_admin!— operator grant missing, inactive, or absentThe first is the one that bites, because it sends no
detailat all — so this hint is the only thing the caller reads. An admin whose operator grant lapsed was told to check the payer address.The new text
Identical across rail0-ts, rail0-go, rail0-ruby and rail0-cli — fixing one and leaving three would recreate the drift these tables have hit before. Companion PRs in the other three.