From 7ccfcdb81e7994d487ea34677fec17af2660a3f9 Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Tue, 10 Oct 2023 09:50:04 +1100 Subject: [PATCH] refactor: improve Stripe product setup warning (#627) This points the web dev to the appropriate README section for creating a Stripe product. --- routes/pricing.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/routes/pricing.tsx b/routes/pricing.tsx index 140e138f2..e2d4a31e5 100644 --- a/routes/pricing.tsx +++ b/routes/pricing.tsx @@ -169,6 +169,12 @@ export default defineRoute(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 ( <>