Exception responses (iOS SDK)
The iOS SDK returns two types of exceptions: ClientError and ServerError.
A ClientError indicates a client-side issue, such as a parameter error or a network error. A ServerError indicates an exception response from the OSS server.
|
Error type |
Error Domain |
Code |
UserInfo |
Description |
Solution |
|
ClientError |
com.aliyun.oss.clientError |
0 |
OSSClientErrorCodeNetworkingFailWithResponseCode0 |
Connection exception |
Check the network connectivity and retry. |
|
1 |
OSSClientErrorCodeSignFailed |
Signature failed |
For more information, see Troubleshoot signature errors. |
||
|
2 |
OSSClientErrorCodeFileCantWrite |
Failed to write to file. |
The specified path for the breakpoint record file or the download file path is invalid. Modify the file path and retry. |
||
|
3 |
OSSClientErrorCodeInvalidArgument |
Invalid parameter |
The parameter format is incorrect. Refer to the relevant API in API overview and provide the correct parameter format. |
||
|
4 |
OSSClientErrorCodeNilUploadid |
Failed to obtain the uploadId for the resumable upload task. |
Check that the parameters, such as objectMeta, are correct. Then, try to obtain the uploadId again. |
||
|
5 |
OSSClientErrorCodeTaskCancelled |
Task was canceled. |
Check if the task cancellation logic in your code is correct or if there is a network connectivity issue. |
||
|
6 |
OSSClientErrorCodeNetworkError |
Network exception |
Check the network connectivity and retry. |
||
|
7 |
OSSClientErrorCodeInvalidCRC |
Cyclic redundancy check (CRC) failed. |
Data inconsistency occurred during transfer. Check if the file was modified. |
||
|
8 |
OSSClientErrorCodeCannotResumeUpload |
Resumable upload failed and cannot be continued. |
The file was changed during the upload, which caused a file size mismatch. Do not modify the file during the upload process. |
||
|
9 |
OSSClientErrorCodeExcpetionCatched |
Exception caught |
Troubleshoot the issue based on the specific error message. |
||
|
ServerError |
com.aliyun.oss.serverError |
(-1 * httpResponse.statusCode) |
dict |
The dictionary obtained from parsing the XML response. |
The server may have encountered an error and could not complete the request. For more information, see OSS error codes. |