Skip to content

Commit 8ff3fc2

Browse files
committed
better error handling for transak link
1 parent d55f708 commit 8ff3fc2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/checkout/src/api/data.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,10 @@ export const getTransakWidgetUrl = async (
550550
})
551551
})
552552

553+
if (!res.ok) {
554+
throw new Error(`Transak API error: ${res.status} ${res.statusText}`)
555+
}
556+
553557
const { url } = await res.json()
554558

555559
return {

0 commit comments

Comments
 (0)