Skip to content

Fix duplicate MPP denial error in human mode - #348

Open
thinhtran-stripe wants to merge 1 commit into
mainfrom
fix/mpp-human-denial-error
Open

thinhtran-stripe wants to merge 1 commit into
mainfrom
fix/mpp-human-denial-error

Conversation

@thinhtran-stripe

Copy link
Copy Markdown
Contributor

Summary

Fixes duplicate error output when an MPP spend request is denied in human mode.

Previously, the component rendered the correct denial error, then returned null, which the command wrapper misinterpreted as an unexpected component exit. This produced a second misleading error.

Now, null is treated as an already-rendered failure with exit code 1, while undefined still indicates an unexpected component exit.

Tests

Tested against the live Stripe Climate MPP endpoint and with the existing MPP test suite.

node packages/cli/dist/cli.js mpp pay \
    https://climate.stripe.dev/api/contribute \
    -d '{"amount":100}' \
    --context 'Testing denial handling in link-cli human mode with a Stripe Climate contribution request that will be
    explicitly rejected before payment.' \
    --test

Before:
Screenshot 2026-09-17 at 5 16 11 PM

After:
Screenshot 2026-09-17 at 5 08 04 PM

Safe to revert.

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.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.

1 participant