• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. Developer Guide (Python SDK)
  4. Troubleshooting
  5. SDK Common Result Objects

SDK Common Result Objects

Each time an API (excluding ObsClient.createV2SignedUrl, ) in an instance of ObsClient is called, an SDK common result object will be returned. You can obtain the HTTP status code from this object to check whether the operation is successful. The object is defined as follows:

Namespace

Class

Module

GetResult

com.obs.response.get_result

Description

Field

Type

Description

status

int

HTTP status code. If the value is smaller than 300, the operation succeeds. Otherwise, the operation fails.

reason

str

Reason description

errorCode

str

Error code returned by the OBS server. If status is smaller than 300, the value is None.

errorMessage

str

Error description returned by the OBS server. If status is smaller than 300, the value is None.

requestId

str

Request ID returned by the OBS server.

hostId

str

Requested server ID. If status is smaller than 300, the value is None.

resource

str

Error source (a bucket or an object). If status is smaller than 300, the value is None.

header

list

Response header list, composed of tuples. Each tuple consists of two elements, respectively corresponding to the key and value of a response header.

body

object

Result content returned after the operation is successful. If status is smaller than 300, the value is None. The value varies with the API. For details, see the OBS Python SDK API Reference.