diff --git a/plugin-src/getUserData.ts b/plugin-src/getUserData.ts index 0c8d3598..76e22e30 100644 --- a/plugin-src/getUserData.ts +++ b/plugin-src/getUserData.ts @@ -8,6 +8,6 @@ export const getUserData = async () => { } }); } else { - console.error('Could not get user data'); + console.warn('Could not get user data'); } }; diff --git a/plugin-src/registerComponentProperties.ts b/plugin-src/registerComponentProperties.ts index 3fcd1241..297bde94 100644 --- a/plugin-src/registerComponentProperties.ts +++ b/plugin-src/registerComponentProperties.ts @@ -8,6 +8,6 @@ export const registerComponentProperties = (node: ComponentSetNode | ComponentNo } }); } catch (error) { - console.error('Error registering component properties', node, error); + console.warn('Could not register component properties', node, error); } }; diff --git a/plugin-src/transformers/partials/transformVectorPaths.ts b/plugin-src/transformers/partials/transformVectorPaths.ts index 740a549d..f95931de 100644 --- a/plugin-src/transformers/partials/transformVectorPaths.ts +++ b/plugin-src/transformers/partials/transformVectorPaths.ts @@ -19,7 +19,7 @@ export const transformVectorPaths = (node: VectorNode): PathShape[] => { try { regions = node.vectorNetwork?.regions ?? []; } catch (error) { - console.error('Error accessing vector network', node, error); + console.warn('Could not access the vector network', node, error); } const strokeLength = node.strokes.length; diff --git a/plugin-src/transformers/transformSceneNode.ts b/plugin-src/transformers/transformSceneNode.ts index a4a7b90e..014af8f9 100644 --- a/plugin-src/transformers/transformSceneNode.ts +++ b/plugin-src/transformers/transformSceneNode.ts @@ -62,7 +62,7 @@ export const transformSceneNode = async (node: SceneNode): Promise { return translateImageFill(fill); } - console.error(`Unsupported fill type: ${fill.type}`); + console.warn(`Unsupported fill type: ${fill.type}`); }; export const translateFills = ( @@ -60,5 +60,5 @@ export const translatePageFill = (fill: Paint): string | undefined => { return rgbToHex(fill.color); } - console.error(`Unsupported page fill type: ${fill.type}`); + console.warn(`Unsupported page fill type: ${fill.type}`); }; diff --git a/ui-src/context/useFigma.ts b/ui-src/context/useFigma.ts index d5f12ae1..a5272716 100644 --- a/ui-src/context/useFigma.ts +++ b/ui-src/context/useFigma.ts @@ -122,7 +122,7 @@ export const useFigma = (): UseFigmaHook => { setLoading(false); setExporting(false); track('Error', { 'Error Message': pluginMessage.data }); - break; + throw new Error(pluginMessage.data); } } };