This article introduces the result codes in the process of using the gateway to facilitate troubleshooting.
Result codes for gateway
1000 means that API call succeeded, while all other result codes indicat failures.
1001-5999 and 7000-7999 are gateway errors.
7000-7999 means that error occurrs in the signature verification or decryption performed by mobile security guard. See the Security Guard result codes for troubleshooting.
Other than result codes, you can also check the
Memo
andtips
fields in the response Header to learn more about the error.Besides, AntStack users can check
~logsgatewaygateway-error.log
on the gateway server for error details.
When an exception occurs, you can troubleshoot it with reference to Gateway exception troubleshooting.
Result code | Description | Explanation |
1000 | Processing succeeded | Succeeded in calling the gateway API. |
1001 | Access denied | Incorrect Mock format, |
1002 | The maximum call times exceeded | If traffic limiting configuration is enabled, the exception may occur when the traffic limit is triggered. |
1005 | Unauthorized | Authorization verification failed after enabling API authorization. |
2000 | Login timed out | If authorization verification function is enabled, the exception may occur if you are not logged in. |
3000 | RPC interface doesn’t exist or is closed | In the workspace of the current workspaceId, the mobile application of the appId has no API service with such operationType configured, or the API service is not in the Open status. |
3001 | Null request data |
|
3002 | Incorrect data format | The RPC request format is incorrect. AntStack users can check server log |
3003 | Data decryption failed | Data decryption failed. |
4001 | Service request timed out | MGS timed out while calling the business system. It is caused by high backend business system load. Check the running condition of the backend system. If the timeout setting is not appropriate, you can adjust it appropriately. Note: The timeout period is 3 seconds by default. |
4002 | Remote call on the business system failed | An exception occurred when MGS called the business system. AntStack users can check server log |
4003 | API group HOST exception | An |
5000 | Unknown exception | Unknown errors. AntStack users can check server log |
7000 | No public key available | Mobile App’s mobile security guard has no secret key of the appId, or the gateway failed to obtain the corresponding signing key of the appId. |
7001 | Not enough parameters for signature verification | The gateway server-side signature verification failed. |
7002 | Signature verification failed | The gateway server-side signature verification failed. |
7003 | Signature verification - Timeliness failure | The timestamp of API request parameter |
7007 | Signature verification - | API request doesn’t provide the |
7014 | Signature verification - | API request doesn’t provide the |
8002 | Cross-domain pre-check request (CORS preflight) | Cross-domain pre-check request. |
Result codes for business system
For the following result codes, you can view the corresponding error information in the business systems’ servers.
You can find specific information about the exceptions by checking ~/logs/mobileservice/monitor.log
log on each business system.
Result code | Applicable protocol | Description | Explanation |
6000 | MPC, DUBBO | RPC - target service not found | Cannot find the released service; the server failed to access the service; or the service has been migrated to somewhere else. |
6001 | MPC, DUBBO | RPC - target method not found | Cannot find the method in the released service. |
6002 | MPC, DUBBO | RPC - Incorrect number of parameters | The number of input parameters is not consistent with the number of declared parameters. |
6003 | MPC, DUBBO | RPC - target method is inaccessible | The target method cannot be called. |
6004 | HTTP, MPC, DUBBO | RPC - JSON parsing exception | HTTP: Failed to convert RPC parameters to backend HTTP request parameters. MPC/DUBBO: Failed to deserialize RPC JSON data to business parameter objects. |
6005 | MPC, DUBBO | RPC - Invalid parameters exist when the system calls target method | Invalid parameters exist in call reflection. |
6007 | MPC, DUBBO | RPC - Login verification service unavailable | You haven’t implemented the login verification interface in SPI package, or the login verification interface is incorrectly configured. |
6666 | HTTP, MPC, DUBBO | RPC - Business exception | HTTP: The HTTP status code returned by the backend system is not 200. MPC/DUBBO: The exception reported by the business system. The exceptions that cannot be handled by RPC are regarded as business exceptions. |
Result codes for Android client
Result code | Description | Prompt |
0 | Unknown error | Unknown error. Please try again later. |
1 | Client failed to find the communication object, no Transport available. | Network error. Please try again later. |
2 | Client has no network access. For example, the user shuts down network or disabled the application’s network access. | Failed to connect to network. |
3 | SSL relevant errors, including SSL handshake error, SSL certificate error | Incorrect client certificate. Check if the mobile time setting is correct. |
4 | Client network connection timeout; TCP connection timeout. Currently, the timeout period is 10s. | Poor network connection |
5 | Slow client network connection, Data read/write timeout, socketTimeout | Poor network connection |
6 | No response from server, NoHttpResponseException | Network error. Please try again later. |
7 | Client network IO error, corresponds to IOException | Network error. Please try again later. |
8 | Client network request scheduling error, execution thread interrupted | Network error. Please try again later. |
9 | Client processing error, including serialization error, annotation processing error, thread execution error | Network error. Please try again later. |
10 | Client data deserialization error, incorrect server data format | Network error. Please try again later. |
13 | Request interruption error. For example, when the thread is interrupted, the request is interrupted accordingly | Network error. Please try again later. |
15 | Client network authorization error, HttpHostConnectException, Connection to “xxx” refused, no network access, or the corresponding server refused connection. | Failed to connect to network. |
16 | DNS parse error | Failed to connect to network, please try again later. |
18 | Network limited; client request limited. When the volume of client requests exceeds the threshold, the network requests will be limited. | Network has been limited. Please try again later. |
code >= 400 & code < 500 | HTTP response code is 4xx | Failed to connect to network. |
400 > code >= 100 & 500 < code < 600 | Reponse codes for HTTP failure | Failed to connect to network. Please try again later. |