Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Add more logs

Joshen Limb57fc12da86d
diff --git a/studio/components/interfaces/Billing/ProUpgrade.tsx b/studio/components/interfaces/Billing/ProUpgrade.tsx
index e4eae47af07..d30584ef87c 100644
--- a/studio/components/interfaces/Billing/ProUpgrade.tsx
+++ b/studio/components/interfaces/Billing/ProUpgrade.tsx
@@ -160,17 +160,21 @@ const ProUpgrade: FC<Props> = ({
const onConfirmPayment = async () => {
setIsSubmitting(true)
+ let token = captchaToken
- const token =
- captchaToken ?? (await captchaRef.current?.execute({ async: true }))?.response ?? undefined
-
- console.log('confirm', { token })
-
- if (!token) {
+ try {
+ if (!token) {
+ const captchaResponse = await captchaRef.current?.execute({ async: true })
+ token = captchaResponse?.response ?? null
+ }
+ } catch (error) {
+ console.log('ERRORR', error)
setIsSubmitting(false)
return
}
+ console.log('TOKEN', { token })
+
const payload = formSubscriptionUpdatePayload(
currentSubscription,
selectedTier,