nomad icon indicating copy to clipboard operation
nomad copied to clipboard

client stats endpoint returns 500 and not 404 for "unknown node" error

Open tgross opened this issue 5 months ago • 0 comments

In the /v1/client/allocation/stats endpoint, we catch "unknown allocation" and "no path to node" RPC errors correctly and return 404. We don't catch the "unknown node" error and instead return 500.

Ideally we'd fix this upstream by adding the CodedError method in the RPC handler, rather than catching it in the HTTP handler. There are likely other cases of this in the allocation API.

tgross avatar Sep 25 '25 15:09 tgross