Resilience: hbf-webchat
Error handling and retry patterns for this service. Platform-wide patterns:
docs/architecture/resilience.md
HTTP Retry
- Library: botframework-webchat (Microsoft Bot Framework) with native retry handling
- Attempts: SDK default (not explicitly configured)
- Backoff: SDK default
- On failure: Delegated entirely to Bot Framework SDK internals
Queue Retry
Not applicable. Frontend widget, no queue consumers.
Timeouts
| Call | Timeout | Configured in |
|---|---|---|
| Message send (sendTimeout) | 20000ms (20s) | Bot Framework SDK config |
| Attachment send (sendTimeoutForAttachments) | 120000ms (2 min) | Bot Framework SDK config |
| Other HTTP calls | None (no explicit timeout) | N/A |
Circuit Breakers
None implemented.
Fallback Strategy
| Failure scenario | Behaviour | User impact |
|---|---|---|
| Token expired at startup | isTokenExpiredAtStartUp flag set, triggers reconnection flow | Brief delay while token refreshes |
| Direct Line connection lost | isDirectLineConnectionFulfilled tracks state | Chat becomes unresponsive until reconnection |
Known Gaps
- No explicit retry logic in widget code; entirely dependent on Bot Framework SDK internal retry behaviour
- No custom error recovery beyond token refresh on startup
- Timeout configured only on message/attachment sends, not on other HTTP calls the widget may make
- No user-facing error state or reconnection UI when Direct Line connection drops