Skip to content

Commit fc001a8

Browse files
committed
better error handling for transak link
1 parent 82f122b commit fc001a8

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
@@ -320,6 +320,10 @@ export const getTransakWidgetUrl = async (
320320
})
321321
})
322322

323+
if (!res.ok) {
324+
throw new Error(`Transak API error: ${res.status} ${res.statusText}`)
325+
}
326+
323327
const { url } = await res.json()
324328

325329
return {

0 commit comments

Comments
 (0)