Resilience: hbf-lcm
Error handling and retry patterns for this service. Platform-wide patterns:
docs/architecture/resilience.md
HTTP Retry
- Library: got (v11.8.5)
- Attempts: 1 (got retry capability exists but is NOT enabled in code)
- Backoff: N/A
- On failure: Error logged, re-thrown as
HTTPError; exception filter returns structured error withErrorCodeenum
Queue Retry
Not applicable. This service does not consume queues.
Timeouts
| Call | Timeout | Configured in |
|---|---|---|
| hbf-bot event callbacks | 3000ms | bot-client.service.ts (hardcoded) |
| Translation service | Configurable | SERVICE_TRANSLATION_TIMEOUT_SECONDS env var |
| All other HTTP calls | Not set | got defaults |
Circuit Breakers
None. No circuit breaker library is configured or used.
Fallback Strategy
| Failure scenario | Behaviour | User impact |
|---|---|---|
| hbf-bot callback fails | Error logged and re-thrown as HTTPError | Bot event not delivered |
| Translation service fails | Error logged and re-thrown | Translation unavailable |
| Any HTTP error | Exception filter returns structured error with ErrorCode | Caller receives error response |
Health Check
- Endpoint:
GET /health - Behaviour: Returns empty 200 response. Does NOT check any dependencies (database, downstream services, etc.).
Known Gaps
- got retry capability is available but unused in all HTTP clients
- Only one hardcoded timeout (3000ms for bot callbacks); all other calls have no timeout
- Health check is a no-op (does not verify database or downstream service connectivity)
- No circuit breaker on any dependency