D1: Place Discord notifications in Identity service
Context: Need to send Discord notifications to admins when feedback is created. Choice needed between Gateway (proxy) vs Identity (storage owner).
Choice: Place DiscordWebhookService in the Identity service. Since Identity is the feedback storage owner, webhooks should also be sent from the same service.
Alternatives: Gateway sends webhook after Identity response — rejected as it adds business logic to the proxy layer.
When to Reuse: When calling external services (webhooks, notifications, etc.) that should not affect the main business logic on failure. Log errors only with .catch() without propagating exceptions.
P2: Silent skip + single warning when env var is not set
When to Reuse: When an optional external integration service should not block service startup if env var is missing. Use warnedMissingUrl flag to prevent log spam.
Gotchas
G1: CI branches coverage 98% threshold not met
Symptom: Identity test branches at 97.91% after first push, causing CI failure.
Root Cause: Non-Error throw case in err instanceof Error ? ... : String(err) branch not covered.
Fix: Added string throw test case to bring coverage to 98.43% (e29832e).