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; }