Skip to content

Commit 406114e

Browse files
committed
fix: update getGrafanaModuleStatus to handle errors and return null on failure
1 parent 8649a46 commit 406114e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/components/common/navigation/NavigationRoutes.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,14 @@ const NavigationRoutes = ({ reloadVersionConfig }: Readonly<NavigationRoutesType
389389
}
390390
}
391391

392-
const getGrafanaModuleStatus = () => getModuleInfo(ModuleNameMap.GRAFANA)
392+
const getGrafanaModuleStatus = async () => {
393+
try {
394+
const response = await getModuleInfo(ModuleNameMap.GRAFANA)
395+
return response
396+
} catch {
397+
return null
398+
}
399+
}
393400

394401
const handleFetchInitialData = async () => {
395402
try {

0 commit comments

Comments
 (0)