Skip to content

Commit 6d72d85

Browse files
app page loading issue fix
1 parent 4b2af3f commit 6d72d85

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/App/src/api/api.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,13 @@ export async function getLayoutConfig(): Promise<{
184184
}> {
185185
try {
186186
return await layoutConfigCache.getOrCreate("layout-config", async () => {
187-
const response = await httpClient.get("/api/layout-config");
188-
if (!response.ok) {
189-
return {
190-
appConfig: null,
191-
charts: [],
192-
};
193-
}
187+
const response = await retryRequest(async () => {
188+
const res = await httpClient.get("/api/layout-config");
189+
if (!res.ok) {
190+
throw new Error(`Layout config request failed: ${res.status}`);
191+
}
192+
return res;
193+
}, 3, 1000);
194194

195195
const layoutConfigData = await parseResponseJson<{
196196
appConfig: AppConfig;

0 commit comments

Comments
 (0)