CMS visual fixes (#417)

* CMS visual fixes

* Create sour-deers-camp.md
This commit is contained in:
Dawid 2023-04-24 11:18:02 +02:00 committed by GitHub
parent 56b27b2e21
commit fc0664885e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 3 deletions

View file

@ -0,0 +1,5 @@
---
"saleor-app-cms": patch
---
CMS visual fixes

View file

@ -121,7 +121,7 @@ export const providersConfig = {
name: "itemTypeId",
label: "Item Type ID (number)",
helpText:
'You can find this as Model ID in your DatoCMS product variant model settings, by clicking "Edit model".',
"To find your Model ID go into Models -> Your product variant Model -> Edit Model button. The Model ID is in the right corner.",
},
{
name: "baseUrl",

View file

@ -38,6 +38,7 @@ const handler: NextProtectedApiHandler = async (
const logger = pinoLogger.child({
endpoint: "sync-products-variants",
});
logger.debug("Called endpoint sync-products-variants");
const client = createClient(authData.saleorApiUrl, async () => ({
@ -95,8 +96,10 @@ const handler: NextProtectedApiHandler = async (
logger.debug({ provider }, "The provider instance settings provider.");
if (!validation.success) {
// todo: use instead: throw new Error(validation.error.message);
// continue with other provider instances
/*
* todo: use instead: throw new Error(validation.error.message);
* continue with other provider instances
*/
logger.error(
{ error: validation.error.message },
"The provider instance settings validation failed."
@ -104,6 +107,7 @@ const handler: NextProtectedApiHandler = async (
return res.status(400).json({
success: false,
error: validation.error.message,
});
}
@ -129,6 +133,7 @@ const handler: NextProtectedApiHandler = async (
const isAvailable = variantAvailableChannels?.some((channel) =>
enabledChannelsForSelectedProviderInstance.includes(channel)
);
return !!isAvailable;
};