The standard approach to expressing errors in a REST API
is to use HTTP status codes. As is often the case with
REST, this works fine for simple systems, but is simply
too limiting for more sophisticated systems, particularly
those which might submit a JSON or XML document to
describe a POST request.
That's what the response body is for. If a client PUTs (or POSTs) a malformed representation, it's reasonable for the response to be 400 with error detail in the body.The "depth" parameter is kind of interesting, since it gives the client a choice as to whether multiple resources are included in the response. I'd be interested to see how others implement this (or if the client is given no choice at all).
But essentially this is a straightforward choice between latency and response size.