Skip to content

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 ​

  • 0 indicates success.
  • A non-0 value 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 CodeError MessageDescription
0successSuccess
10001service exceptionService exception
10002invalid paramsInvalid parameter
10401invalid access tokenInvalid access token
10450missing http headerMissing HTTP header
10460invalid signatureInvalid signature
10461invalid encryptInvalid encryption
42001access token expiredAccess token expired
42002invalid app idInvalid app id
42003invalid app keyInvalid app key
42004app id mismatch between header and tokenappId in the header does not match the one in the token
42005app id mismatch between header and request bodyappId in the header does not match the one in the request body
42006invalid app platformInvalid app platform
42010invalid refresh tokenInvalid refresh token
42011invalid user signatureInvalid user signature
42013invalid session idInvalid session id
42015not found app configApp configuration not found
42016invalid game idInvalid game id
42020missing user tokenMissing user token
42021invalid user tokenInvalid user token
42022not found sessionSession not found
42030invalid sign dataInvalid signature data
42031invalid product idInvalid product id
42032product price errorProduct price error
42033pay signature errorPayment signature error
42034signature errorSignature error
42035duplicated out trade noDuplicated external trade number
42036invalid trade noInvalid trade number
42037missing game pay secretMissing game payment secret
42038missing app data asymmetric keyMissing app data asymmetric key
42039missing app data symmetric keyMissing app data symmetric key
42100not found available packageNo available package found
42101not linked gameGame not linked
42102missing game metadataMissing game metadata
42103missing game support infoMissing game support info
43040invalid ad typeInvalid ad type
43041invalid ad unit idInvalid ad unit ID
43042sud trans id errorFailed to generate sud trans id
43043invalid ad event typeInvalid ad reporting event type

3. Troubleshooting Suggestions ​

  1. 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.
  2. 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.
  3. For session and signature errors (such as 42011, 42013, 42022, 42030, 42034), first check the session state, signature data, and signature generation logic.
  4. 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.