You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
} catch (error) {
console.error('Error:', error);
res.status(400).send({ error: error.message });
}
}); when i hit this api on postman ("/offersPolicies?sku=MG39-E29") the response was bad request and the error in message is show is ("{
"error": "This is an invalid value for a SKU. Only alphanumeric characters can be used for SKUs, and their length must not exceed 50 characters"
}") please guide me
The text was updated successfully, but these errors were encountered:
app.get('/offersPolicies', async function (req, res) {
try {
// const isValidSku = /^[a-zA-Z0-9]{1,50}$/.test(viewItemSku);
// if (!isValidSku) {
// return res.status(400).send({ error: 'Invalid SKU format' });
// }
} catch (error) {
console.error('Error:', error);
res.status(400).send({ error: error.message });
}
}); when i hit this api on postman ("/offersPolicies?sku=MG39-E29") the response was bad request and the error in message is show is ("{
"error": "This is an invalid value for a SKU. Only alphanumeric characters can be used for SKUs, and their length must not exceed 50 characters"
}") please guide me
The text was updated successfully, but these errors were encountered: