How to handle nested resources in Web API ("REST") when not found?
===

Let say I have a resource `Person` and on a person I have a nested resource `SomeResource`. Which status code should be returned and why in the following scenarios?

    /Person/1/SomeResource (SomeResource does not exist)
    /Person/1/SomeResource (Person does not exist)

I think that 404 should be used in both scenarios but not everyone agrees and I would like to know why. You could argue that `Person` is the underlying resource and `SomeResource` is just a "property" on that resource and the request to `SomeResource` should therefor return nothing in the first scenario but 404 in the second scenario. I think that might be an option, but I still like 404 more. Another scenario that I don't like at all is to return 500 with an error description, that was an alternative I heard in the discussion as well but that forces the consumer to program against exception which I don't like. 500 for me means that something went wrong and you can't really do anything about it.