Skip to content

Commit 185c476

Browse files
committed
fix(integrations): address round-2 review
- airtable: coerce upsert typecast as string-aware boolean (string "false" no longer truthy) - microsoft-excel: format_range surfaces precise partial-state error when fill PATCH fails after font (no atomic font+fill endpoint in Graph)
1 parent dd8b49b commit 185c476

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

apps/sim/blocks/blocks/airtable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ Return ONLY the valid JSON array of record ID strings - no explanations, no mark
379379
...baseParams,
380380
records: parsedRecords,
381381
fieldsToMergeOn: parsedFieldsToMergeOn,
382-
...(typecast != null ? { typecast: Boolean(typecast) } : {}),
382+
...(typecast != null ? { typecast: typecast === true || typecast === 'true' } : {}),
383383
}
384384
case 'delete':
385385
return { ...baseParams, recordIds: parsedRecordIds }

apps/sim/tools/microsoft_excel/format_range.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,13 @@ export const formatRangeTool: ToolConfig<
189189
if (!fillResp.ok) {
190190
const errorText = await fillResp.text().catch(() => '')
191191
const detail = parseGraphErrorMessage(fillResp.status, fillResp.statusText, errorText)
192-
throw new Error(`Failed to apply fill color: ${detail}`)
192+
// Graph has no single endpoint to set font and fill together, so they are
193+
// two PATCHes. The font already succeeded here; surface that explicitly so
194+
// the partial state is clear. Formatting is idempotent — re-running with only
195+
// the fill color safely finishes the operation.
196+
throw new Error(
197+
`Font formatting was applied, but the fill color update failed: ${detail}. Re-run with only the fill color to finish.`
198+
)
193199
}
194200
fillApplied = true
195201
}

0 commit comments

Comments
 (0)