From 81d27df90dd292bfe6160179036fe3f21d4b8037 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 2 May 2026 11:58:35 +0200 Subject: [PATCH] Add AI service health check and improve layout --- apps/api/src/app/health/health.controller.ts | 2 +- apps/client/src/app/pages/api/api-page.component.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/api/src/app/health/health.controller.ts b/apps/api/src/app/health/health.controller.ts index 37de9528e..35f3fa348 100644 --- a/apps/api/src/app/health/health.controller.ts +++ b/apps/api/src/app/health/health.controller.ts @@ -52,7 +52,7 @@ export class HealthController { ): Promise> { try { const { text } = await this.aiService.generateText({ - prompt: 'Reply with the word "OK" and nothing else.' + prompt: `Reply with the word "OK" and nothing else.` }); if (text === 'OK') { diff --git a/apps/client/src/app/pages/api/api-page.component.ts b/apps/client/src/app/pages/api/api-page.component.ts index df5c7e1ff..e75a51c73 100644 --- a/apps/client/src/app/pages/api/api-page.component.ts +++ b/apps/client/src/app/pages/api/api-page.component.ts @@ -77,9 +77,11 @@ export class GfApiPageComponent implements OnInit { private catchFetchFailure(): OperatorFunction { return catchError(({ error }: HttpErrorResponse) => { - const body = error as { status?: string }; + const body = error as { message?: string; status?: string }; + const status = body?.status ?? 'Error'; + const fetchError = body?.message ? `${status}: ${body.message}` : status; - return of({ fetchError: body?.status ?? 'Error' }); + return of({ fetchError }); }) as OperatorFunction; }