forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Jawei, Li <lijiawei5@huawei.com> Co-committed-by: Jawei, Li <lijiawei5@huawei.com>
5.7 KiB
5.7 KiB
Error Responses Syntax
Error Response Headers
In an error response, header information contains:
- Content-Type: application/xml
- HTTP status code 3xx, 4xx, or 5xx. For details, see Table 1.
Error Response Body
The response body contains several elements that provide error details. The following is an example error response containing all common elements in REST error responses:
<?xml version="1.0" encoding="UTF-8"?> <Error> <Code>NoSuchKey</Code> <Message>The resource you requested does not exist</Message> <Resource>/example-bucket/object</Resource> <RequestId>001B21A61C6C0000013402C4616D5285</RequestId> <HostId>RkRCRDJENDc5MzdGQkQ4OUY3MTI4NTQ3NDk2Mjg0M0FB QUFBQUFBYmJiYmJiYmJD</HostId> </Error>
Error Response Elements
Table 1 describes REST response elements.
Element |
Description |
---|---|
Error |
Container of all error elements. |
Code |
A string that uniquely identifies an error. For details about error codes, see Table 1. |
Message |
Error details in the XML format. For details about error codes, see Table 1. |
RequestId |
ID of the request whose error response is returned. The ID is used for locating internal errors. |
HostId |
ID of the server that returns an error response. |
Resource |
The requested resource such as a bucket or object. |
Parent topic: Error Responses