Hi I am trying to create a product using the wix-stores.V2 interface but i receive an error an i am not sure how to fix it.
import { products } from 'wix-stores.v2';
async function createProduct(product) {
try {
const result = await products.createProduct(product);
return result;
} catch (error) {
console.error(error);
// Handle the error
}
}
export function button1_click(event) {
const PC = {
"name": "Intel Configurator",
"description": "Configure your very own Intel Pc",
"priceData": {
"price": "59.99"
}
}
console.log(PC)
createProduct(PC)
}
Error Given
{...}jsonTableCopy JSON
name: "Intel Configurator"
description: "Configure your very own Intel Pc"
priceData: {...}jsonTableCopy JSON
price: "59.99"
------------------------------------------------------------------------------
Error: message: ''
details:
applicationError:
description: Unknown
code: UNKNOWN
data: {}