Elias SoykatE
Convex Community4mo ago
2 replies
Elias Soykat

Connection lost while action was in flight Called by client

  useEffect(() => {
        if (step !== 'org') {
            return;
        }

        setLoadingMessage('Loading organization ID');

        if (!organizationId) {
            setErrorMessage('Organization ID is required');
            setScreen('error');
            return;
        }

        setLoadingMessage('Verifying organization...');

        validateOrganization({ organizationId })
            .then((result) => {
                if (result.valid) {
                    setOrganizationId(organizationId);
                    setStep('session');
                } else {
                    setErrorMessage(result.reason || 'Invalid configuration');
                    setScreen('error');
                }
            })
            .catch((error) => {
                console.error('Unable to verify organization', error);
                setErrorMessage('Unable to verify organization');
                setScreen('error');
            });
    }, [
        step,
        organizationId,
        setErrorMessage,
        setScreen,
        setOrganizationId,
        setStep,
        validateOrganization,
        setLoadingMessage,
    ]);


Getting this error but can't understand what's wrong with my code? i'm try to solve this issue multiple ways as explain on other thread but could not solve the issue. please help me to solve the issue
Was this page helpful?