Product SiteDocumentation Site

8.3.10.  Handling Errors

Some errors require further explanation beyond that provided by a standard HTTP status code. For example, an unsuccessful resource state update or action is reported with a fault representation in the response entity-body. The fault contains reason and detail strings, which are also localized depending on the Accept-Language HTTP header. Clients initiating a request that fails in this way are to unmarshal either a fault or the expected resource representation, depending on the response status code. Such cases are clearly indicated in the individual resource documentation.
PUT /rhevm-api/{collection}/{resource_id} HTTP/1.1
Accept: application/xml
Content-Type: application/xml

<{resource}>
    <id>id-update-test</id>
</{resource}>

HTTP/1.1 409 Conflict
Content-Type: application/xml

<fault>
    <reason>Broken immutability constraint</reason>
    <detail>Attempt to set immutable field: id</detail>
</fault>