Comment on page
Faults generated from API requests are .json documents with
objectproperty value. When reading and writing context properties, a
pathproperty will usually be available, representing the full property path. A fault may also have children, especially in the case of
cortex.invalidArgument.validation, where property validation errors are represented as children, whose
pathproperty can be examined to pinpoint the error source.
Here's an example of listing a non-existent object:
$ mdctl api GET /missing
"message": "Invalid or unknown object.",
There are two faults,
cortex.accepted.mediaNotReady, whose HTTP statuses are in the 2XX range. In these cases, clients must handle a seemingly successful response as a fault.
Some faults may also have child faults represented as a
faultsarray. For example, most validation errors (
cortex.invalidArgument.validation) contains child faults so clients can pinpoint the source of each error.