Elias Soykat
Elias Soykat8h ago

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,
]);
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
2 Replies
Convex Bot
Convex Bot8h ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
erquhart
erquhart7h ago
Can you share the action itself

Did you find this page helpful?