From 36102876cebb4f6058ddbe7fc430a1e48b5a8cbc Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Wed, 17 Jan 2024 14:56:38 +0100 Subject: [PATCH] :pencil: (sheets) Add additional insights to debug sheets not showing --- .../api/integrations/google-sheets/spreadsheets/[id]/sheets.ts | 2 ++ apps/docs/editor/blocks/integrations/google-sheets.mdx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/builder/src/pages/api/integrations/google-sheets/spreadsheets/[id]/sheets.ts b/apps/builder/src/pages/api/integrations/google-sheets/spreadsheets/[id]/sheets.ts index 5010d427d..92187453b 100644 --- a/apps/builder/src/pages/api/integrations/google-sheets/spreadsheets/[id]/sheets.ts +++ b/apps/builder/src/pages/api/integrations/google-sheets/spreadsheets/[id]/sheets.ts @@ -34,6 +34,8 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => { try { await sheet.loadHeaderRow() } catch (err) { + if (err && typeof err === 'object' && 'message' in err) + console.log(err.message) return } return { diff --git a/apps/docs/editor/blocks/integrations/google-sheets.mdx b/apps/docs/editor/blocks/integrations/google-sheets.mdx index 5f710e56a..56f5905b6 100644 --- a/apps/docs/editor/blocks/integrations/google-sheets.mdx +++ b/apps/docs/editor/blocks/integrations/google-sheets.mdx @@ -12,7 +12,7 @@ With the Google Sheets integration step, you can inject, update or get data from /> -In order to properly work, your spreadsheet must have its first row as a header row. This is how the block knows which column to update: +In order to properly work, your spreadsheet must have its first row as a header row. And all header name should be unique. This is how the block knows which column to update: