Error codes

Updated at:

Use this reference to diagnose errors returned by the Intelligent Speech Interaction SDK and server during short sentence recognition and real-time speech recognition.

How errors are reported

Errors come from two sources:

  • SDK errors — generated during SDK use and returned in a callback.

  • Server errors — returned when the SDK raises a DEFAULT_NLS_ERROR or HTTP_SERVER_ERROR event. The status field in the event's header object contains the server-side error code. For details, see Error codes returned by the server.

SDK error codes

Successful requests

Error codeError messageDescription
0SUCCESSThe request succeeded.

Configuration and parameter errors

Error codeError messageDescription
240999DEFAULT_ERRORAn internal error occurred.
240001NUI_CONFIG_INVALIDThe configuration file is invalid.
240002ILLEGAL_PARAMA parameter value is invalid.
240003ILLEGAL_INIT_PARAMAn initialization parameter is invalid.
240004NECESSARY_PARAM_LACKA required parameter is missing.
240005NULL_PARAM_ERRORA parameter is empty.
240006NULL_LISTENER_ERRORNo listener callback is registered.
240007NULL_DIALOG_ERRORNo valid dialog instance exists. This is typically an internal status error.
240008NULL_ENGINE_ERRORNo valid engine instance exists. Check whether engine initialization succeeded.
240009ILLEGAL_DATAThe audio data URL is invalid, or the audio data exceeds the size limit.

SDK status errors

Error codeError messageDescription
240010ILLEGAL_REENTRANTThe SDK was called after the client exited.
240011SDK_NOT_INITThe SDK is not initialized.
240012SDK_ALREADY_INITThe SDK is initialized more than once.
240013DIALOG_INVALID_STATEThe internal dialog instance is in an abnormal state.
240014STATE_INVALIDThe SDK is in an abnormal state.
240015ILLEGAL_FUNC_CALLThe SDK is called in an invalid mode.

System errors

Error codeError messageDescription
240020MEM_ALLOC_ERRORMemory allocation failed.
240021FILE_ACCESS_FAILFile access failed.
240022CREATE_DIR_ERRORThe storage directory could not be created.

Internal SDK call errors

Error codeError messageDescription
240030CREATE_NUI_ERRORThe engine could not be created.
240031TEXT_DIALOG_START_FAILThe text comprehension task could not be started.
240032TEXT_CANCEL_START_FAILThe text comprehension task could not be canceled.
240033WUW_DUPLICATEDuplicate dynamic wake-up words were specified.

Client engine errors

Error codeError messageDescription
240040CEI_INIT_FAILThe client engine failed to initialize.
240041CEI_SET_PARAM_FAILAn engine parameter could not be set.
240042CEI_COMPILE_GRAMMER_FAILGrammar compilation failed.
240043CEI_STOP_FAILThe client engine could not stop the recognition task.
240044CEI_CANCEL_FAILThe client engine could not cancel the recognition task.
240045CEI_UNLOAD_KWS_FAILThe client engine could not unload the specified wake-up words.
240046GET_WUW_ERRORThe client engine could not retrieve the specified wake-up words.

Audio data errors

Error codeError messageDescription
240050SELECT_RECORDER_ERRORThe recording device was not selected properly.
240051UPDATE_AUDIO_ERRORAudio data could not be pushed to the server. This is typically caused by audio data that exceeds the size limit.
240052MIC_ERRORThe microphone captured no audio for 2 consecutive seconds.

Request timeout errors

Error codeError messageDescription
240080ENGINE_INIT_TIMEOUTThe engine initialization request timed out.
240081SET_PARAM_TIMEOUTThe parameter configuration request timed out.
240082SET_WUW_TIMEOUTThe wake-up word configuration request timed out.
240083SELECT_RECORDER_TIMEOUTThe recording device selection request timed out.
240084STOP_TIMEOUTThe dialog termination request timed out.
240085ASR_ENGINE_STOP_TIMEOUTThe engine stop request timed out.
240086UNLOAD_DYNAMIC_WUW_TIMEOUTThe dynamic wake-up word removal request timed out.
240087ADD_DYNAMIC_WUW_TIMEOUTThe dynamic wake-up word addition request timed out.
240100WAIT_TIMEOUTThe engine request timed out.
240101HANDLE_API_TIMEOUTThe API request timed out.

Network errors

Error codeError messageDescription
240060CREATE_DA_REQUEST_ERRORThe dialog assistant could not be created.
240061START_DA_REQUEST_ERRORThe dialog assistant could not be started.
240062DEFAULT_NLS_ERRORA server-side error occurred. This error also generates a server error code. See Error codes returned by the server.
240063SSL_ERRORThe Secure Sockets Layer (SSL) certificate could not be created.
240064SSL_CONNECT_FAILEDThe SSL connection failed.
240065HTTP_CONNECT_FAILEDThe HTTP connection failed.
240066DNS_FAILEDDomain Name System (DNS) resolution failed.
240067CONNECT_FAILEDThe socket connection failed.
240068SERVER_NOT_ACCESSThe server is unreachable.
240069SOCKET_CLOSEDThe socket connection was closed.
240070AUTH_FAILEDAuthentication failed.
240071HTTPDNS_FAILEDThe connection to the server using the specified IP address failed.

Network timeout errors

Error codeError messageDescription
240090UPDATE_CONTEXT_TIMEOUTThe client update request timed out.
240091CONNECTION_TIMEOUTThe network connection timed out.
240092PARTIAL_ASR_TIMEOUTThe request to get the intermediate automatic speech recognition (ASR) result timed out.
240093ASR_TIMEOUTThe request to get the final ASR result timed out.
240094DIALOG_TIMEOUTThe request to get the dialog processing result timed out.
240095WWV_TIMEOUTThe request to get the server-side wake-up result timed out.

Error codes returned by the server

When the SDK raises an EVENT_ASR_ERROR event with error code 240062 (DEFAULT_NLS_ERROR), the status field in the event's header object contains the server-side error code listed here.

For server errors 50000000, 50000001, and 52010001 — if the error occurs occasionally, no action is required. If the error recurs repeatedly, submit a ticket.
Error codeCauseSolution
40000001Authentication failed.Check whether the token has expired or is invalid.
40000002The request message is invalid.Check whether the message format meets the service requirements.
403The token has expired or is invalid.Check whether the token has expired. If it is still within its validity period, verify that it is correct.
40000004The idle connection timed out because no data was sent for 10 consecutive seconds.Check whether the client is sending data at the expected rate.
40000005The number of requests exceeds the limit.Check whether the number of concurrent connections or queries per second (QPS) exceeds the limit. To increase the concurrency limit, upgrade Intelligent Speech Interaction from the trial edition to Commercial Edition. If you are already on Commercial Edition, purchase additional resources.
40000000A client error occurred (default client error).Check the error message for details. If the issue persists, submit a ticket.
41010120The client timed out because no audio data was sent for 10 or more consecutive seconds.Check whether the client is sending audio data at the expected rate.
50000000A server error occurred (default server error).If occasional: no action needed. If recurring: submit a ticket.
50000001An internal call error occurred on the server.If occasional: no action needed. If recurring: submit a ticket.
52010001An internal call error occurred on the server.If occasional: no action needed. If recurring: submit a ticket.
40010001The method is not supported.Submit a ticket.
40010002The instruction is not supported.Submit a ticket.
40010003The instruction is invalid.Submit a ticket.
40010004The client disconnected before the server completed the task.Check whether the client disconnected prematurely and ensure the connection stays open until the task finishes.
40010005The task is in an abnormal state.Check whether the instruction is valid for the current task state.
40020105The appkey is invalid.Resolve the route to check whether the application exists.
40020106The appkey and token do not match.Check that the appkey belongs to the same Alibaba Cloud account as the token.
40020503Resource Access Management (RAM) user authentication failed.Use your Alibaba Cloud account to grant the RAM user access to the POP API.
41040201No data was received from the client for 10 consecutive seconds.Check the network connection or whether no business data needs to be sent.
41040202The client is sending data too fast, consuming all server resources.Check whether the client sends data at an appropriate transmission rate, for example, at the real-time factor of 1:1.
41040203The audio coding format is not supported.Convert the audio to a format supported by the SDK.
41040204Methods were called in the wrong order.Check that the client calls the request method before calling other methods.
41040205The MAXSILENCE_PARAM value is out of range.Check whether the value of the MAXSILENCE_PARAM parameter is in the range of 200 to 2000.
41050008The audio sampling rate does not match the ASR model.Check that the audio sampling rate in the service call matches the sampling rate of the ASR model bound to the application in the console.
51040101An internal server error occurred.Check the error message and resolve the issue accordingly.
51040102Reserved.N/A
51040103The real-time speech recognition service is unavailable.Check whether the number of concurrent real-time speech recognition tasks exceeds the limit.
51040104The real-time speech recognition request timed out.Check the real-time speech recognition service logs.
51040105The real-time speech recognition service call failed.Check whether the service is enabled and whether the port is reachable.
51040106Load balancing failed and the service IP address could not be resolved.Check whether the real-time speech recognition server in the configured virtual private cloud (VPC) is running properly.