When a request error occurs during SDK usage, an exception is thrown, and the error details are logged (saved to the program runtime directory oss_sdk.log by default).
The two types of OSS Ruby SDK exceptions are: ClientError and ServerError and both are the subclasses of RuntimeError.
ClientError is an internal SDK error, such as incorrect parameter setting or object modification during the resumable upload or download.
ServerError indicates a server error, generated by parsing a server error message. ServerError has the following attributes:
- http_code: The HTTP status code of the error request.
- error_code: OSS error code.
- message: OSS error message.
- request_id: The UUID that uniquely identifies the request. When you cannot solve the problem, you can seek help from OSS development engineers by providing this RequestId.
For more information, see OSS error response.