Skip to content

fix(identity-webhook): map allowance rejects to 483/503 + publish 0.4.2#10

Merged
eliteprox merged 4 commits into
feat/balance-gatefrom
fix/exchange-allowance-wire-status
Jul 15, 2026
Merged

fix(identity-webhook): map allowance rejects to 483/503 + publish 0.4.2#10
eliteprox merged 4 commits into
feat/balance-gatefrom
fix/exchange-allowance-wire-status

Conversation

@eliteprox

Copy link
Copy Markdown

Summary

  • Composite app_*_* exchange no longer collapses mint-gate HTTP 402 to webhook 401.
  • Remaps allowance rejects onto the identity-hook statuses go-livepeer passthroughs from authLivePayment — matching createBalanceGate:
    • mint 402 / trial_credits_exhausted → webhook 483 insufficient_balance
    • billing_unavailable → webhook 503
  • Preserves upstream error_description as webhook reason.
  • Bumps package to 0.4.2.

Base: feat/balance-gate

Test plan

  • cd identity-webhook && npm test (83 passing)
  • Merge into feat/balance-gate, then tag v0.4.2 to publish
  • Gateway /generate-live-payment returns HTTP 483 (not 401) when allowance is exhausted

Composite app_*_* token exchange was collapsing mint-gate HTTP 402
(trial_credits_exhausted) to webhook status 401, so gateways could not
distinguish auth failure from exhausted funds. Forward 402 / 503 and bump
to 0.4.2 for publish (0.4.1 already shipped).
go-livepeer authLivePayment only passthroughs webhook body status+reason.
Align composite exchange allowance rejects with createBalanceGate: 483
insufficient_balance (not 402) and 503 billing_unavailable, preserving
upstream error_description as reason for the gateway.
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 21249ecc-4096-4ecd-8b4a-3c5f7a98ee20

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/exchange-allowance-wire-status

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@eliteprox

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Extract JWKS resolver construction to reduce cognitive complexity, use typed argument errors, and simplify identity validation without changing behavior.
@sonarqubecloud

Copy link
Copy Markdown

@eliteprox
eliteprox merged commit b271e93 into feat/balance-gate Jul 15, 2026
5 checks passed
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