Area
Notification Service / API Validation
Complexity
Easy
File(s)
notification-service/src/api.ts (PUT handler, lines 111-166)
Problem
docs/NOTIFICATIONS.md documents: "At least one of email or webhook_url must be provided." The handler validates the type of each field individually but never checks that at least one is actually present. A PUT with an empty body (or { enabled: true } only) returns 200 and silently persists a preference that can never notify anyone — notifyInvestors computes hasEmail/hasWebhook as both false and just continues, with no error surfaced anywhere to the caller who thought they'd registered for notifications.
Scope
In:
- Reject (400) a PUT where both email and webhook_url are absent/empty on the resulting preference (accounting for updates to an existing preference that already has one set).
Out:
- Email format validation (separate, lower-priority).
Acceptance Criteria
Area
Notification Service / API Validation
Complexity
Easy
File(s)
notification-service/src/api.ts (PUT handler, lines 111-166)
Problem
docs/NOTIFICATIONS.md documents: "At least one of email or webhook_url must be provided." The handler validates the type of each field individually but never checks that at least one is actually present. A PUT with an empty body (or { enabled: true } only) returns 200 and silently persists a preference that can never notify anyone — notifyInvestors computes hasEmail/hasWebhook as both false and just continues, with no error surfaced anywhere to the caller who thought they'd registered for notifications.
Scope
In:
Out:
Acceptance Criteria