stripe / stripe-cli

A command-line tool for Stripe
https://stripe.com/docs/stripe-cli
Apache License 2.0
1.57k stars 362 forks source link

Improve error message when triggering an supported event #1190

Closed tlefevre-stripe closed 1 month ago

tlefevre-stripe commented 1 month ago

Reviewers

r? @ cc @stripe/developer-products

Summary

Before, when running stripe trigger <EVENT>, we may get this error message:

The event ‘xxx’ is not supported by the Stripe CLI.

With this PR, the error contains more information to help developers figure out next steps:

The event xxx is not supported by Stripe CLI. To trigger unsupported events, use the Stripe API or Dashboard to perform actions that lead to the event you want to trigger (for example, create a Customer to generate a customer.created event). You can also create a custom fixture: https://docs.stripe.com/cli/fixtures