This commit is contained in:
Viet An
2026-06-26 16:26:07 +07:00
parent 6ff4112d66
commit 2acdcde9df
9 changed files with 44 additions and 25 deletions

View File

@@ -14,8 +14,15 @@ export default defineNuxtPlugin((nuxtApp) => {
const notReadyConns = connlist.filter((v) => !v.ready);
async function getReady() {
await $getapi(notReadyConns);
store.ready = true;
try {
await $getapi(notReadyConns);
store.ready = true;
} catch (error) {
showError({
statusCode: 500,
statusMessage: `api-loader plugin failed: ${error.message}`,
});
}
}
if (notReadyConns.length > 0) getReady();
});