Skip to content

Commit

Permalink
Return NotFound for unknown pod names
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Leong <[email protected]>
  • Loading branch information
adleong committed Oct 26, 2023
1 parent ce950d1 commit 29e6683
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controller/api/destination/watcher/pod_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ func (pw *PodWatcher) getEndpointByHostname(hostname string, svcID *ServiceID) (
}
}

return nil, fmt.Errorf("no pod found in Endpoints %s/%s for hostname %s", svcID.Namespace, svcID.Name, hostname)
return nil, status.Errorf(codes.NotFound, "no pod found in Endpoints %s/%s for hostname %s", svcID.Namespace, svcID.Name, hostname)
}

func (pp *podPublisher) subscribe(listener PodUpdateListener) {
Expand Down

0 comments on commit 29e6683

Please sign in to comment.