Skip to content

Commit 9c4669c

Browse files
committed
ugraded sdk version
1 parent 9d3fccd commit 9c4669c

File tree

4 files changed

+977
-258
lines changed

4 files changed

+977
-258
lines changed

next/lib/data.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,17 @@ export async function checkoutAction(cart) {
6060

6161

6262
if (inventory.length === 0 || cart.quantities.length === 0) {
63-
throw new Error ("Not enough inventory for product")
63+
const error = new Error("Not enough inventory for product")
64+
Sentry.captureException(error);
65+
throw error;
6466
}
6567

6668
for (let inventoryItem of inventory) {
6769
let id = inventoryItem.id;
6870
console.log(inventoryItem.count, cart.quantities[id]);
6971
if (inventoryItem.count < cart.quantities[id] || cart.quantities[id] >= inventoryItem.count) {
7072
const error = new Error("Not enough inventory for product")
73+
Sentry.captureException(error);
7174
throw error;
7275
}
7376
}

next/next.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ export default withSentryConfig(nextConfig, {
4242
// See the following for more information:
4343
// https://docs.sentry.io/product/crons/
4444
// https://vercel.com/docs/cron-jobs
45-
automaticVercelMonitors: true,
45+
automaticVercelMonitors: false,
4646
});

0 commit comments

Comments
 (0)