Skip to content

Commit

Permalink
refactor: improve Stripe product setup warning (denoland#627)
Browse files Browse the repository at this point in the history
This points the web dev to the appropriate README section for creating a
Stripe product.
  • Loading branch information
iuioiua authored Oct 9, 2023
1 parent d5a048f commit 7ccfcdb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions routes/pricing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,12 @@ export default defineRoute<State>(async (_req, ctx) => {
active: true,
});

if (data.length === 0) {
throw new Error(
"No Stripe products have been found. Please see https://github.com/denoland/saaskit#set-up-stripe-optional to set up Stripe locally and create a Stripe product.",
);
}

return (
<>
<Head title="Pricing" href={ctx.url.href} />
Expand Down

0 comments on commit 7ccfcdb

Please sign in to comment.