mirror of
https://github.com/vercel/commerce.git
synced 2025-05-12 20:57:51 +00:00
feat(analytics): updated action error messages
This commit is contained in:
parent
69062c0395
commit
7be35ae4e3
@ -29,7 +29,7 @@ export async function addItem(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!selectedVariantId) {
|
if (!selectedVariantId) {
|
||||||
return { success: false, message: 'Missing variant ID' };
|
return { success: false, message: 'Missing product variant ID' };
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -37,6 +37,7 @@ export async function addItem(
|
|||||||
revalidateTag(TAGS.cart);
|
revalidateTag(TAGS.cart);
|
||||||
return {
|
return {
|
||||||
success: true,
|
success: true,
|
||||||
|
message: 'Item added to cart',
|
||||||
cartId
|
cartId
|
||||||
};
|
};
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user