fix: align schedule API responses with contract - #1135
Conversation
Co-authored-by: aikido-pr-checks[bot] <169896070+aikido-pr-checks[bot]@users.noreply.github.com>
| if resp.StatusCode == http.StatusNotFound { | ||
| resp.Body.Close() | ||
| continue |
There was a problem hiding this comment.
🟡 Medium - Object schedule silently drops peers with no local instance
When the aggregate's replicated instance-config cache still lists a node whose local object configuration has already disappeared, that peer returns 404 No local instance (Trigger). The new branch treats every peer 404 as an empty contribution (Mechanism). The object endpoint then returns 200 with a partial schedule list and gives callers no indication that one configured instance was omitted (Consequence).
Show fix
Only ignore the peer's explicitly expected No schedule table cached response, or otherwise verify that the 404 represents a configured-but-unscheduled instance; propagate No local instance (and other missing-instance responses) so callers do not receive a falsely complete aggregate.
More info - Reply on this comment to give feedback or ignore the issue.
400response for invalid object kinds and404for unknown objects.nulland empty item collections as[].ScheduleItemkind and declaring timestamps as nullable.