edit-icon download-icon

Exception

Last Updated: Nov 06, 2017

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

ClientError is an internal SDK error, such as incorrect parameter setting or object modification during the resumable upload or download.

ServerError

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.

Thank you! We've received your feedback.