Skip to content

Commit 39f86bd

Browse files
committed
fix(apollo): add runtime guard for account_bulk_update empty body
1 parent 7504a6a commit 39f86bd

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

apps/sim/tools/apollo/account_bulk_update.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ export const apolloAccountBulkUpdateTool: ToolConfig<
6767
if (params.account_attributes && params.account_attributes.length > 0) {
6868
body.account_attributes = params.account_attributes
6969
}
70+
if (!body.account_ids && !body.account_attributes) {
71+
throw new Error(
72+
'Apollo account bulk update requires either account_ids or account_attributes to be provided'
73+
)
74+
}
7075
return body
7176
},
7277
},

0 commit comments

Comments
 (0)