Chore: Don't show a "Not found" for public-dashboard fetches if the service is disabled via config (#108650)

don't show 404 toast if pubdash is completely disabled
This commit is contained in:
Michael Mandrus
2025-07-25 11:55:10 -04:00
committed by GitHub
parent 69d3b9023c
commit f69f25be5d

View File

@ -43,7 +43,7 @@ export const publicDashboardApi = createApi({
try {
await queryFulfilled;
} catch (e) {
if (isFetchBaseQueryError(e) && isFetchError(e.error)) {
if (isFetchBaseQueryError(e) && isFetchError(e.error) && config.publicDashboardsEnabled) {
dispatch(notifyApp(createErrorNotification(e.error.data.message)));
}
}