There are two types of exceptions in the iOS SDK: ClientError and ServerError.
ClientError indicates parameter and network errors. ServerError indicates abnormal responses from the OSS server.
Error type | Error domain | Code | UserInfo | Description | Solution |
ClientError | com.aliyun.oss.clientError | 0 | OSSClientErrorCodeNetworkingFailWithResponseCode0 | The network connection is abnormal. | Check the network connection and try again. |
1 | OSSClientErrorCodeSignFailed | A signature failure occurs. | For more information about troubleshooting, see Troubleshoot signature errors. | ||
2 | OSSClientErrorCodeFileCantWrite | The object fails to be written to the server. | The path of the checkpoint file for upload or download or the path of the object to be download may be invalid. Modify the corresponding path and try again. | ||
3 | OSSClientErrorCodeInvalidArgument | The parameter is invalid. | The parameter format is incorrect. For more information about the parameter format, see List of operations by function. | ||
4 | OSSClientErrorCodeNilUploadid | The upload ID for the resumable upload task fails to be obtained. | Check the parameters. For example, check whether the object metadata is correct. Try again. | ||
5 | OSSClientErrorCodeTaskCancelled | The task is canceled. | Check whether the logic used to cancel the task is correct or whether the network connection is normal. | ||
6 | OSSClientErrorCodeNetworkError | The network is abnormal. | Check the network connection and try again. | ||
7 | OSSClientErrorCodeInvalidCRC | The CRC check fails. | Data is inconsistent during transfer. Check whether the object is modified. | ||
8 | OSSClientErrorCodeCannotResumeUpload | The resumable upload task fails. | The object is modified during upload, causing inconsistency in the size of the object. Do not modify the object during upload. | ||
9 | OSSClientErrorCodeExcpetionCatched | An exception is captured. | Troubleshoot the error based on the specific error information. | ||
ServerError | com.aliyun.oss.serverError | (-1 * httpResponse. statusCode) | dict | The directory obtained by parsing the corresponding XML file. | An error may occur on the server, causing the server unable to complete the request. For more information about troubleshooting, see Overview. |