mirror of https://github.com/kortix-ai/suna.git
fix(lp): fix agent start on landing page
This commit is contained in:
parent
ed66a0c0f8
commit
1fac5015f4
|
@ -138,14 +138,9 @@ export function HeroSection() {
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error('Error creating agent:', error);
|
console.error('Error creating agent:', error);
|
||||||
|
|
||||||
// Check specifically for BillingError (402)
|
|
||||||
if (error instanceof BillingError) {
|
if (error instanceof BillingError) {
|
||||||
console.log('Handling BillingError from hero section:', error.detail);
|
console.log('Handling BillingError from hero section:', error.detail);
|
||||||
// Open the payment required dialog modal instead of showing the alert
|
|
||||||
onOpen("paymentRequiredDialog");
|
|
||||||
// Don't show toast for billing errors
|
|
||||||
} else {
|
} else {
|
||||||
// Handle other errors (e.g., network, other API errors)
|
|
||||||
const isConnectionError =
|
const isConnectionError =
|
||||||
error instanceof TypeError &&
|
error instanceof TypeError &&
|
||||||
error.message.includes('Failed to fetch');
|
error.message.includes('Failed to fetch');
|
||||||
|
|
Loading…
Reference in New Issue