Skip to content

Commit 35d40dc

Browse files
committed
fix(apollo): require contact_ids with object-form contact_attributes
1 parent aa52f0d commit 35d40dc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

apps/sim/tools/apollo/contact_bulk_update.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ export const apolloContactBulkUpdateTool: ToolConfig<
7373
'Apollo bulk update requires contact_attributes (the fields to update). Use contact_attributes alone (array of per-contact updates with id) or together with contact_ids (single object applied to all listed contacts).'
7474
)
7575
}
76+
if (!Array.isArray(body.contact_attributes) && !body.contact_ids) {
77+
throw new Error(
78+
'Apollo bulk update with object-form contact_attributes requires contact_ids to identify which contacts to update.'
79+
)
80+
}
7681
if (params.async !== undefined) body.async = params.async
7782
return body
7883
},

0 commit comments

Comments
 (0)