Error codes

If an error occurs when you call an API, an error response is returned, where the result object indicates the error code (resultCode) and error message (resultMessage). You can use error codes and messages to troublshoot issues.

Error codes are usually classified into the following categories:

Common error codes

The following table lists all common error codes for Mini Program OpenAPIs. If you do not find an error code in the following table, it means that the error code is not common, but dedicated to a specific OpenAPI (see the following API-specific error codes section).

resultCode

resultMessage

resultStatus

Action to do

PROCESS_FAIL

A general business failure occurred. Do not retry.

F

Human intervention is usually needed. It is recommendeded that you contact Mini Program Technical Support to troubleshoot the issue. 

PARAM_ILLEGAL

Illegal parameters. For example, non-numeric input, invalid date.        

F

Check and verify whether the request fields (including the header fields and body fields) of the current API are correct and valid.

For details, see the specific API specification, for example, the applyToken API specification.

INVALID_API

The called API is invalid or not active.

F

Check whether the current API name is used by mistakes when the API is called.

ACCESS_DENIED

Access is denied                   

F

Need to check the resultMessage of the current API specification for details. For example, the applyToken API specification.

REQUEST_TRAFFIC_EXCEED_LIMIT

The request traffic exceeds the limit.

   

F

  • The party that calls APIs needs to reduce the API calling frequency, or
  • The API service provider needs to increase the traffic limit or threshold.

EXPIRED_ACCESS_TOKEN

The access token is expired.

F

Renew the access token by calling the applyToken API /v1/authorizations/applyToken

UNKNOWN_EXCEPTION

An API calling is failed, which is caused by unknown reasons.

U

Trying to re-call the API might help to resolve the issue. 

API-specific error codes

For error codes that are dedicated to a specific API, see the Result section in each API specification, for example , the applyToken API specification.