BUG: /health returns text/plain not application/json — smoke tests fail #59

Closed
opened 2026-05-25 02:06:02 -04:00 by zgaetano · 0 comments
Owner

Bug

GET /health returns text/plain body "healthy" instead of JSON {"status":"ok"}.

Impact

  • API smoke test (deploy/api-smoke.sh) skips /health but any external health-checker expecting JSON will fail
  • Confuses with the rest of the API which is uniformly JSON

Location

services/mam-api/src/index.js:38

app.get('/health', (_req, res) => res.json({ status: 'ok' }));

This is correct in the code. The live deploy at http://10.0.0.25:42423/health returns text/plain + string "healthy". The response header was Content-Type: text/plain and body was healthy (8 bytes, no braces).

Hypothesis: The live deploy is running a different image than the current source, OR the nginx reverse proxy in front (web-ui) is terminating /health before it reaches mam-api. The web-ui nginx config (currently unreviewed) may intercept /health and return static text.

Check services/web-ui/nginx.conf — if there's a location block catching /health at the proxy level, that explains the discrepency.

## Bug `GET /health` returns `text/plain` body `"healthy"` instead of JSON `{"status":"ok"}`. ## Impact - API smoke test (`deploy/api-smoke.sh`) skips `/health` but any external health-checker expecting JSON will fail - Confuses with the rest of the API which is uniformly JSON ## Location `services/mam-api/src/index.js:38` ```js app.get('/health', (_req, res) => res.json({ status: 'ok' })); ``` This is correct in the code. The live deploy at `http://10.0.0.25:42423/health` returns `text/plain` + string `"healthy"`. The response header was `Content-Type: text/plain` and body was `healthy` (8 bytes, no braces). **Hypothesis:** The live deploy is running a different image than the current source, OR the nginx reverse proxy in front (web-ui) is terminating `/health` before it reaches mam-api. The web-ui nginx config (currently unreviewed) may intercept `/health` and return static text. Check `services/web-ui/nginx.conf` — if there's a location block catching `/health` at the proxy level, that explains the discrepency.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: WildDragonLLC/dragonflight#59
No description provided.