Exception handling

Last Updated: Oct 26, 2017

The two types of exceptions in the SDK are ClientError and ServerError. ClientError includes parameter errors and network errors, while ServerError includes an exceptional response returned by the OSS Server.

Error typeError DomainCodeUserInfo
com.aliyun.oss.clientErrorOSSClientErrorCodeNetworkingFailWithResponseCode0Connection exception
OSSClientErrorCodeSignFailedFailed signature
OSSClientErrorCodeFileCantWriteFailed to write a file
OSSClientErrorCodeInvalidArgumentInvalid parameter
OSSClientErrorCodeNilUploadidFailed to obtain the upload ID of a resumable upload task
OSSClientErrorCodeTaskCancelledTask canceled
OSSClientErrorCodeNetworkErrorNetwork exception
OSSClientErrorCodeCannotResumeUploadResumable upload failed and discontinued
OSSClientErrorCodeNotKnownUnknown exception
ServerErrorcom.aliyun.oss.serverError(-1 * httpResponseCode)Dictionary obtained by resolving a response in the XML format
Thank you! We've received your feedback.