Updated on 2022-02-10 GMT+08:00

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

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