coderio 1.0.1-alpha.2 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1463,10 +1463,13 @@ var FigmaTool = class {
1463
1463
  }
1464
1464
  const document = await fetchFigmaNode(fileId, nodeId, token);
1465
1465
  if (!document || !document?.children?.length) {
1466
- return void 0;
1466
+ throw new Error("Failed to fetch Figma document");
1467
1467
  }
1468
1468
  const images = await fetchFigmaImages(fileId, nodeId, token);
1469
1469
  const thumbnail = images?.[nodeId] || "";
1470
+ if (!thumbnail) {
1471
+ throw new Error("Failed to fetch Figma document thumbnail");
1472
+ }
1470
1473
  document.thumbnailUrl = thumbnail;
1471
1474
  const cleanedDocument = cleanFigma(document);
1472
1475
  return cleanedDocument;