Skip to content

Commit 29ff902

Browse files
committed
fix(update): res.ok means it worked
1 parent 8af9293 commit 29ff902

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

packages/workshop-app/app/components/update-repo.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@ export function UpdateToast({
7070
},
7171
},
7272
)
73-
if (res.ok) {
74-
throw new Error('Request to update workshop failed')
73+
if (!res.ok) {
74+
throw new Error(
75+
`Request to update workshop failed: ${res.statusText}`,
76+
)
7577
}
7678
const data = await res.json().catch(() => ({}))
7779
const schema = z.object({

0 commit comments

Comments
 (0)