fix(editor): Fix cloud plan data loading on instance (#7841)
Moving cloud hooks and store initialization logic after users are authenticated. This will ensure user local account is available when their cloud plan data is being fetched. This PR also adds the following error handling improvements: - Added error handling to the same initialization logic - Fixed empty `catch` clauses inside the cloud store which caused it to silently fail and complicated debugging of this bug
This commit is contained in:
committed by
GitHub
parent
90bb6ba417
commit
8b99384367
@@ -6,7 +6,12 @@ export async function initializeCloudHooks() {
|
||||
return;
|
||||
}
|
||||
|
||||
const { n8nCloudHooks } = await import('@/hooks/cloud');
|
||||
extendExternalHooks(n8nCloudHooks);
|
||||
cloudHooksInitialized = true;
|
||||
try {
|
||||
const { n8nCloudHooks } = await import('@/hooks/cloud');
|
||||
extendExternalHooks(n8nCloudHooks);
|
||||
} catch (error) {
|
||||
throw new Error(`Failed to extend external hooks: ${error.message}`);
|
||||
} finally {
|
||||
cloudHooksInitialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user