We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b2af3f commit 6d72d85Copy full SHA for 6d72d85
1 file changed
src/App/src/api/api.ts
@@ -184,13 +184,13 @@ export async function getLayoutConfig(): Promise<{
184
}> {
185
try {
186
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
- }
+ const response = await retryRequest(async () => {
+ const res = await httpClient.get("/api/layout-config");
+ if (!res.ok) {
+ throw new Error(`Layout config request failed: ${res.status}`);
+ }
+ return res;
+ }, 3, 1000);
194
195
const layoutConfigData = await parseResponseJson<{
196
appConfig: AppConfig;
0 commit comments