Skip to content

fix(errors): a bare forbidden is not about payers - #25

Merged
pviti merged 2 commits into
mainfrom
fix/forbidden-is-not-only-about-payers
Aug 28, 2026
Merged

fix(errors): a bare forbidden is not about payers#25
pviti merged 2 commits into
mainfrom
fix/forbidden-is-not-only-about-payers

Conversation

@pviti

@pviti pviti commented Aug 28, 2026

Copy link
Copy Markdown
Member

A bare forbidden was telling every caller about payment creation:

not permitted for this session — on create the payer must be the signed-in address

It describes a rule that no longer exists

The gateway split the party-mismatch 403s into codes of their ownnot_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:

Where Detail sent
require_admin! — operator grant missing, inactive, or absent none, deliberately
a webhook belonging to another account yes
a transaction not signed by an allowed party yes

The first is the one that bites, because it sends no detail at 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

not permitted for this session — typically the operator grant, a resource owned by
another account, or a transaction signed by the wrong wallet

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.

pviti added 2 commits August 28, 2026 19:21
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.
@pviti
pviti merged commit b8710cf into main Aug 28, 2026
1 check passed
@pviti
pviti deleted the fix/forbidden-is-not-only-about-payers branch August 28, 2026 17:25
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