Let's say I have an endpoint like PATCH /person/<personId>
to which I post some JSON like
{ parent: <parentId> }
What would the appropriate HTTP response code be, if the person with id <parentId>
is not found? It should clearly be 404 if the person with id <personId>
is not found, but does this also apply to resources not directly mentioned in the URI of the request itself?
I've tried looking at some explanations of the HTTP error codes, but none were clear on this point.