Hi,
I encountered an issue when running the app and connecting to Stripe (dev env). The app crashes because it expects products with a default price.
In my Stripe test account, I have several products created on-the-fly, many without a default price.
Unhandled Runtime Error
[ Server ] Error: Product must have a default price
Source
src/app/(store)/page.tsx (17:19) @ async Home
15 |
16 | export default async function Home() {
> 17 | const products = await Commerce.productBrowse({ first: 6 });
| ^
18 | const t = await getTranslations("/");
19 |
20 | return (
I used a workaround by adding filters to fetch products from Stripe:
const products = await Commerce.productBrowse({ first: 6, category: "general" });
It would be good to fix this at the base level to only pull products with a default price or handle the issue differently. :)
Regards
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too