New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jbranchaud/sks 91 set up payment options for epic web #1473
jbranchaud/sks 91 set up payment options for epic web #1473
Conversation
jbranchaud
commented
Mar 26, 2024
- feat(ew): add PaymentOptions, remove stripeData
- feat(ew): remove last Stripe import
- feat(ew): use payment options in inngest funcs
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
if (!stripe) { | ||
throw new Error('Payment provider (Stripe) is missing') | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joelhooks does this make sense as a way to handle the "Stripe provider not defined" scenario? This is mostly to let TS know that it definitely exists below since it has to get defined in the API setup for the app to work.
Or is there a more idiomatic inngest way of bailing if the payment provider isn't configured?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it will keep retrying. there's a specific error if you want it to stop trying
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it will keep retrying. there's a specific error if you want it to stop trying
nice, I updated it to use NonRetriableError
🙌 https://www.inngest.com/docs/guides/error-handling#preventing-retries-with-non-retriable-errors