Skip to content

Commit 211d5b1

Browse files
committed
fix[linear]: handle teams API response errors
1 parent 7483381 commit 211d5b1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • apps/sim/app/w/[id]/components/workflow-block/components/sub-block/components/project-selector/components

apps/sim/app/w/[id]/components/workflow-block/components/sub-block/components/project-selector/components/linear-team-selector.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ export function LinearTeamSelector({
4242
body: JSON.stringify({ credential }),
4343
signal: controller.signal,
4444
})
45-
.then((res) => res.json())
45+
.then((res) => {
46+
if (!res.ok) throw new Error(`HTTP error! status: ${res.status}`)
47+
return res.json()
48+
})
4649
.then((data) => {
4750
if (data.error) {
4851
setError(data.error)

0 commit comments

Comments
 (0)