SDK Exceptions (SDK for Java)
SDK custom exceptions (ObsException), thrown by ObsClient, are inherited from class java.lang.RuntimeException. Exceptions are usually OBS server errors, including OBS error codes and error information. This facilitates users to locate problems and troubleshot faults.
ObsException contains the following error information:
- ObsException.getResponseCode(): HTTP status code
- ObsException.getErrorCode(): Error code returned by the OBS server
- ObsException.getErrorMessage(): Error description returned by the OBS server
- ObsException.getErrorRequestId(): Request ID returned by the OBS server
- ObsException.getErrorHostId(): Requested server ID
- ObsException.getResponseHeaders(): HTTP response headers
- ObsException.printStackTrace(): Prints the detailed stack trace of an exception.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot