SDK Custom Exceptions
SDK custom exceptions (Obs\ObsException), thrown by ObsClient, are inherited from class \RuntimeException. Exceptions are usually OBS server errors, including OBS error codes and error information. This facilitates users to locate problems and troubleshot faults.
Obs\ObsException contains the following error information:
- ObsException->getStatusCode: HTTP status code
- ObsException->getExceptionCode: Error code returned by the OBS server
- ObsException->getExceptionMessage: Error description returned by the OBS server
- ObsException->getRequestId: Request ID returned by the OBS server
- ObsException->getHostId: Requested server ID.
- ObsException->getResponse: HTTP response object
- ObsException->getRequest: HTTP request object
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.