Skip to main content

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 with ErrorCode enum

Queue Retry

Not applicable. This service does not consume queues.

Timeouts

CallTimeoutConfigured in
hbf-bot event callbacks3000msbot-client.service.ts (hardcoded)
Translation serviceConfigurableSERVICE_TRANSLATION_TIMEOUT_SECONDS env var
All other HTTP callsNot setgot defaults

Circuit Breakers

None. No circuit breaker library is configured or used.

Fallback Strategy

Failure scenarioBehaviourUser impact
hbf-bot callback failsError logged and re-thrown as HTTPErrorBot event not delivered
Translation service failsError logged and re-thrownTranslation unavailable
Any HTTP errorException filter returns structured error with ErrorCodeCaller 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