stripe-cli
stripe-cli copied to clipboard
Improve error message for stripe listen --forward-to localhost:4242
Problem
Run stripe listen --forward-to localhost:4242 but my localhost server ins't running.
Feature
Currently we show:
stripe listen --forward-to localhost:4242
> Ready! Your webhook signing secret is whsec_b0HfSDldTuSgKD1JwIXGKLniN83VjeNA (^C to quit)
2019-11-03 17:47:16 --> payment_intent.created [evt_1Fauf2ELyXxylgqVBoKj3JIm]
2019-11-03 17:47:16 [ERROR] Failed to POST: Post http://localhost:4242: dial tcp [::1]:4242: connect: connection refused
2019-11-03 17:47:16 --> charge.succeeded [evt_1Fauf2ELyXxylgqVPORooF05]
2019-11-03 17:47:16 [ERROR] Failed to POST: Post http://localhost:4242: dial tcp [::1]:4242: connect: connection refused
2019-11-03 17:47:16 --> payment_intent.succeeded [evt_1Fauf2ELyXxylgqVD87CKXCj]
2019-11-03 17:47:16 [ERROR] Failed to POST: Post http://localhost:4242: dial tcp [::1]:4242: connect: connection refused
Examples
We should have a nicer error messaging, suggesting something like "Failed forwarding webhook to http://localhost:4242:. Sure your web server is running?"
Any ways to solve this?, I know its an enhancement suggestion but I am having legit issues. Currently using Fedora 38
running stripe listen --forward-to https://localhost:4242/webhook on another terminal instance while i try to do the stripe trigger payment_intent.succeeded