Add try-catch-finally to switchCaseData to prevent loading stuck on error
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -355,6 +355,7 @@ async function switchCaseData(id, count) {
|
||||
// Do nothing if clicking the same id
|
||||
if (id === showTraceId.value) return;
|
||||
isLoading.value = true; // Always show loading screen
|
||||
try {
|
||||
infinit404.value = null;
|
||||
infinitMaxItems.value = false;
|
||||
baseInfiniteStart.value = 0;
|
||||
@@ -362,7 +363,11 @@ async function switchCaseData(id, count) {
|
||||
infiniteData.value = await allMapDataStore.getBaseTraceDetail();
|
||||
showTraceId.value = id; // Set after getDetail so the case table finishes loading before switching showTraceId
|
||||
createCy();
|
||||
} catch (error) {
|
||||
console.error("Failed to load data:", error);
|
||||
} finally {
|
||||
isLoading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user