Skip to content

Commit 57ca67d

Browse files
committed
fix: accept any status code below 300 when dispatching a workflow
1 parent 394811d commit 57ca67d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dist/index.mjs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ export async function dispatchWorkflow(distinctId: string): Promise<void> {
3030
});
3131

3232
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
33-
if (response.status !== 204) {
33+
if (response.status >= 300) {
3434
throw new Error(
35-
`Failed to dispatch action, expected 204 but received ${response.status}`,
35+
`Failed to dispatch action, expected 2xx but received ${response.status}`,
3636
);
3737
}
3838

0 commit comments

Comments
 (0)