SDK Error Codes
This document summarizes the common error codes you may encounter when integrating the OpenPaaS SDK into an APP client. When an SDK interface or callback returns a failure, you can use the error code and error message to locate the issue, then investigate the authentication credentials, app configuration, session state, or business parameters in the context of the current call.
1. Error Code Notes
0indicates success.- A non-
0value indicates failure, which should be handled together with the error message returned by the SDK and the current call context. - "Error Message" is the English error description returned by the SDK; "Description" is the corresponding meaning.
2. Error Code Table
| Error Code | Error Message | Description |
|---|---|---|
| 0 | success | Success |
| 10001 | service exception | Service exception |
| 10002 | invalid params | Invalid parameter |
| 10401 | invalid access token | Invalid access token |
| 10450 | missing http header | Missing HTTP header |
| 10460 | invalid signature | Invalid signature |
| 10461 | invalid encrypt | Invalid encryption |
| 42001 | access token expired | Access token expired |
| 42002 | invalid app id | Invalid app id |
| 42003 | invalid app key | Invalid app key |
| 42004 | app id mismatch between header and token | appId in the header does not match the one in the token |
| 42005 | app id mismatch between header and request body | appId in the header does not match the one in the request body |
| 42006 | invalid app platform | Invalid app platform |
| 42010 | invalid refresh token | Invalid refresh token |
| 42011 | invalid user signature | Invalid user signature |
| 42013 | invalid session id | Invalid session id |
| 42015 | not found app config | App configuration not found |
| 42016 | invalid game id | Invalid game id |
| 42020 | missing user token | Missing user token |
| 42021 | invalid user token | Invalid user token |
| 42022 | not found session | Session not found |
| 42030 | invalid sign data | Invalid signature data |
| 42031 | invalid product id | Invalid product id |
| 42032 | product price error | Product price error |
| 42033 | pay signature error | Payment signature error |
| 42034 | signature error | Signature error |
| 42035 | duplicated out trade no | Duplicated external trade number |
| 42036 | invalid trade no | Invalid trade number |
| 42037 | missing game pay secret | Missing game payment secret |
| 42038 | missing app data asymmetric key | Missing app data asymmetric key |
| 42039 | missing app data symmetric key | Missing app data symmetric key |
| 42100 | not found available package | No available package found |
| 42101 | not linked game | Game not linked |
| 42102 | missing game metadata | Missing game metadata |
| 42103 | missing game support info | Missing game support info |
| 43040 | invalid ad type | Invalid ad type |
| 43041 | invalid ad unit id | Invalid ad unit ID |
| 43042 | sud trans id error | Failed to generate sud trans id |
| 43043 | invalid ad event type | Invalid ad reporting event type |
3. Troubleshooting Suggestions
- For authentication and credential errors (such as
10401,42001,42010,42020,42021), first check whether the user login state, access credential, and refresh credential are valid. - For app or game configuration errors (such as
42002,42003,42006,42015,42016), first verify the app ID, app Key, app platform, and game configuration. - For session and signature errors (such as
42011,42013,42022,42030,42034), first check the session state, signature data, and signature generation logic. - For payment or ad errors (such as
42031,42033,43040,43041,43043), investigate together with the input parameters and backend configuration of the corresponding business capability.
