knocklabs / knock-node

Official Node SDK for interacting with the Knock API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`await knock.workflows.deleteSchedules` doesn’t work

heymartinadams opened this issue · comments

Attempting to delete schedules.

const invalidScheduleIds = ['2bT9UKxmLDRz1RqN6rYygLDvXBz']

await knock.workflows.deleteSchedules({ schedule_ids: invalidScheduleIds })

provides the following error:

⨯ [UnprocessableEntityException: The following errors occurred:
	schedule_ids(cast): is invalid
]

Honestly, this error message isn’t much better than the previous one #47 (comment): it doesn’t mean anything to me.

UnprocessableEntityException {
  requestID: 'F64GkhZ2i23oT8oEHBSh',
  status: 422,
  name: 'UnprocessableEntityException',
  message: 'The following errors occurred:\n\tschedule_ids(cast): is invalid\n'
}
commented

@heymartinadams updating might work for ya.

I had a similar message with deleteSubscriptions

'The following errors occurred:\n\trecipients(embed): is invalid\n'

and it was fixed by updating the package. was on 6.1, now 6.5

guessing it was this headers change which puts application/json on all reqs

cheers

Thank you @Namaskar-1F64F! ✨