diff --git a/backend/src/routes/api/health/healthUtils.ts b/backend/src/routes/api/health/healthUtils.ts index 12753a07e6..4b0b147622 100644 --- a/backend/src/routes/api/health/healthUtils.ts +++ b/backend/src/routes/api/health/healthUtils.ts @@ -1,3 +1,4 @@ +import { getDashboardConfig } from '../../../utils/resourceUtils'; import { KubeFastifyInstance } from '../../../types'; import { createCustomError } from '../../../utils/requestUtils'; @@ -7,6 +8,14 @@ export const health = async (fastify: KubeFastifyInstance): Promise<{ health: st const error = createCustomError('failed to get kube status', 'Failed to get Kube context', 503); fastify.log.error(error, 'failed to get status'); throw error; + } else if (!getDashboardConfig()) { + const error = createCustomError( + 'failed to get dashboard config', + 'Failed to get dashboard config', + 503, + ); + fastify.log.error(error, 'failed to get dashboard config'); + throw error; } else { return { health: 'ok' }; }