Promote to Production: CAR-1276 Phase 1 — auth /health 503 error-log fix #286

Merged
Coupon Carl merged 3 commits from uat into main 2026-06-06 00:25:10 +00:00
Owner

CAR-1276 Phase 1 — auth /health 503 error-log fix

Promotes commit f283d5aa from uat to main.

Changes

  • auth/src/index.ts: empty catch now console.errors DB-probe failure (name + message); 503 JSON body gains an error field carrying the message.
  • No happy-path behaviour change: /health 200 contract unchanged.

Sign-offs

  • UAT PASS — Deal Dottie (CAR-1282)
  • Security PASS — Stockboy Steve (CAR-1282)

CI Notes

  • lint, test, e2e, audit, build-and-push-auth all PASS
  • build-and-push (frontend) and deploy-uat failures are pre-existing infra issues (tracked CAR-1213/CAR-1216/CAR-1218), unrelated to this auth-only change.

cc @cpfarhood

## CAR-1276 Phase 1 — auth /health 503 error-log fix Promotes commit `f283d5aa` from `uat` to `main`. ### Changes - `auth/src/index.ts`: empty catch now console.errors DB-probe failure (name + message); 503 JSON body gains an `error` field carrying the message. - No happy-path behaviour change: /health 200 contract unchanged. ### Sign-offs - **UAT PASS** — Deal Dottie (CAR-1282) - **Security PASS** — Stockboy Steve (CAR-1282) ### CI Notes - lint, test, e2e, audit, build-and-push-auth all PASS - build-and-push (frontend) and deploy-uat failures are pre-existing infra issues (tracked CAR-1213/CAR-1216/CAR-1218), unrelated to this auth-only change. cc @cpfarhood
Coupon Carl added 3 commits 2026-06-06 00:25:04 +00:00
fix(auth): log /health 503 error and surface message in body (CAR-1276)
CI / deploy-uat (pull_request) Has been skipped
CI / test (pull_request) Successful in 12s
CI / lint (pull_request) Successful in 13s
CI / build-and-push-receiptwitness (pull_request) Has been skipped
CI / build-and-push-api (pull_request) Has been skipped
CI / build-and-push-auth (pull_request) Has been skipped
CI / audit (pull_request) Successful in 40s
CI / e2e (pull_request) Successful in 1m11s
CI / build-and-push (pull_request) Has been skipped
CI / deploy-dev (pull_request) Has been skipped
CI / lighthouse (pull_request) Failing after 1m15s
b2c4692400
The /health handler's catch block was empty, so when the DB probe
failed we had no log line to diagnose from. UAT auth was crashlooping
on /health 503s for that exact reason — pod logs only showed
'CartSnitch auth service listening on port 3001' and nothing else.

Add console.error with the error name/message and include the message
in the 503 response body so the next time this fails we can read the
actual error from `kubectl logs` without re-deploying.

This is the dev-side observability half of CAR-1276. The underlying
DB failure still needs investigation (likely better-auth schema
missing from the cartsnitch DB; see CAR-1276 for the analysis).

Tests updated to assert the new error field is present and a string.
Co-Authored-By: Paperclip <noreply@paperclip.ing>
fix(auth): log /health 503 error and surface message in body (#283, CAR-1276)
CI / audit (push) Successful in 13s
CI / test (push) Successful in 13s
CI / lint (pull_request) Successful in 14s
CI / test (pull_request) Successful in 13s
CI / lighthouse (push) Failing after 1m22s
CI / e2e (pull_request) Successful in 49s
CI / build-and-push-receiptwitness (pull_request) Has been skipped
CI / e2e (push) Successful in 44s
CI / audit (pull_request) Successful in 13s
CI / build-and-push-api (pull_request) Has been skipped
CI / build-and-push-auth (pull_request) Has been skipped
CI / lighthouse (pull_request) Failing after 1m23s
CI / build-and-push (pull_request) Has been skipped
CI / deploy-dev (pull_request) Has been skipped
CI / deploy-uat (pull_request) Has been skipped
CI / lint (push) Successful in 16m17s
CI / build-and-push-auth (push) Successful in 38s
CI / build-and-push-api (push) Successful in 1m34s
CI / build-and-push (push) Successful in 2m44s
CI / build-and-push-receiptwitness (push) Successful in 3m52s
CI / deploy-uat (push) Has been skipped
CI / deploy-dev (push) Failing after 6s
39804135a4
promote: auth /health 503 error-log fix (CAR-1276 Phase 1) dev→uat (#285)
CI / lint (push) Successful in 14s
CI / e2e (push) Successful in 48s
CI / test (push) Successful in 14s
CI / audit (push) Successful in 15s
CI / lighthouse (push) Failing after 1m19s
CI / build-and-push-api (push) Successful in 2m31s
CI / build-and-push-receiptwitness (push) Successful in 3m14s
CI / build-and-push-auth (push) Successful in 2m2s
CI / build-and-push (push) Failing after 2m13s
CI / deploy-dev (push) Has been skipped
CI / deploy-uat (push) Failing after 7s
CI / audit (pull_request) Successful in 10s
CI / lint (pull_request) Successful in 11s
CI / test (pull_request) Successful in 12s
CI / build-and-push-receiptwitness (pull_request) Has been skipped
CI / build-and-push-api (pull_request) Has been skipped
CI / build-and-push-auth (pull_request) Has been skipped
CI / e2e (pull_request) Successful in 40s
CI / lighthouse (pull_request) Failing after 1m22s
CI / build-and-push (pull_request) Has been skipped
CI / deploy-dev (pull_request) Has been skipped
CI / deploy-uat (pull_request) Has been skipped
f283d5aa02
Coupon Carl merged commit c27f6a1e3c into main 2026-06-06 00:25:10 +00:00
Sign in to join this conversation.