Updated on 2026-08-14 GMT+08:00

SDK Error Codes

Each time you fail to call an ObsClient API, an SDK custom error — containing an HTTP status code, OBS error code, and error message — is returned, to help you locate and rectify the fault. The struct is defined as follows:

SDK error codes includes the following:

  • OBS API error codes. For details, see OBS Error Codes.
  • SDK custom exceptions. For details about the fields and descriptions, see Table 1.
    Table 1 SDK custom exceptions

    Exception

    Exception Description

    ObsException.getStatusCode

    HTTP status code

    ObsException.getErrorRequestId()

    Request ID returned by the OBS server

    ObsException.getResponseHeaders()

    HTTP response headers

    ObsException.getStatus

    HTTP text description

    ObsException.getErrorCode()

    Error code returned by the OBS server

    ObsException.getErrorMessage()

    Error description returned by the OBS server

    ObsException.getErrorHostId()

    Requested server ID

    ObsException.getHostId

    Requested server ID