• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. API Reference (PHP SDK)
  4. Initialization
  5. SDK Custom Exceptions

SDK Custom Exceptions

API Description

SDK custom exceptions are thrown by ObsClient and are inherited from class \RuntimeException. Exceptions are usually OBS server-side errors, including OBS error codes and error information. This facilitates users to locate problems and troubleshot faults.

Namespace

Class

Parent Namespace

ObsException

Obs\Common

Method Description

Method

Return Value Type

Description

ObsException->getExceptionCode

string

Error code returned by the OBS server

ObsException->getExceptionMessage

string

Error description returned by the OBS server

ObsException->getRequestId

string

Request ID returned by the OBS server

ObsException->getHostId

string

Requested server ID

ObsException->getResponse

GuzzleHttp\Psr7\Response

HTTP response object

ObsException->getRequest

GuzzleHttp\Psr7\Request

HTTP request object

ObsException->getStatusCode

integer

HTTP status code