diff --git a/src/client.ts b/src/client.ts index ba5ba5f..47e6a49 100644 --- a/src/client.ts +++ b/src/client.ts @@ -285,9 +285,13 @@ export class ElydoraClient { return handleResponse(res); } + /** 503 carries the degraded report, not an error. */ async deepHealth(): Promise { const url = `${this.baseUrl}/v1/health/deep`; const res = await fetch(url, { method: 'GET', headers: { 'Accept': 'application/json' } }); + if (res.status === 503) { + return (await res.json()) as DeepHealthResponse; + } return handleResponse(res); }