Let's consider the following method:
GET https://server.com/resource1/{id1}/resource2/{id2}/resource3/{id3}/target/{targetId}
So basically we are getting a target
. If the target with targetId
does not exist, we respond with 404 and this is fine. But what about previous resources?
What if resource1
, resource2
, resource3
do not exist?
Is it 404 again? Or is it 400 (not entirely applicable due to HTTP spec though). Or maybe even 424 (because dependent resources are missing)?
I understand there would be no 100% correct answer probably. I'm also aware of REST HTTP status codes for failed validation or invalid duplicate