Skip to content

Error messages

The triggerActionEvent(), getSessionToken() and getSecureSessionToken() methods report failures in two ways. We recommend handling both.

MechanismDescriptionHow to handle
Error token stringsThe promise resolves with an error string in place of the tokenCheck the returned value against the documented prefixes before you treat it as a token
Thrown errorsThe promise rejects with an SdkError, or with a plain Errortry/catch

triggerActionEvent() errors

On failure, triggerActionEvent() resolves with an actionToken that holds one of the error strings below.

PrefixReturned when
server_error_The server rejected the request
client_error_The request could not be built or sent from the browser
invalid_claimed_user_id_type_An unsupported claimedUserIdType was passed
disabled_sdk_The SDK is disabled or was not initialized
communication_error_The request could not reach the server
unexpected_error_Any other failure

Server errors

Format: server_error_<actionType>_<httpCode>_'<message>'_<timestamp>

ErrorDescription and example
500 - Internal Server ErrorDescription: Indicates a general server-side failure. This error occurs when the server encounters an unexpected condition preventing it from fulfilling the request.
Example: server_error_login_500_Something went wrong_1732723499326
502 - Bad GatewayDescription: The server received an invalid response from an upstream server while trying to process the request.
Example: server_error_login_502_Bad Gateway_1732723499326
503 - Service UnavailableDescription: The server is currently unable to handle the request due to temporary overload or maintenance.
Example: server_error_login_503_Server Unavailable_1732723499326
400 - Bad RequestDescription: The request sent by the client is invalid. Specific causes include:
- Invalid request body: The server could not process the request due to malformed syntax.
Example: server_error_login_400_Invalid request_1732722021998
- Decryption error: The server failed to decrypt the request payload.
Example: server_error_login_400_Decryption failed_1732972138346
-Decompression error: The server failed to decompress the request payload.
Example: server_error_login_400_Decompression failed_1732972138346
-Unsupported action type: The request specified an action type not supported by the server.
Example: server_error_dummyType_400_Unsupported action type_1732721929594
401 - UnauthorizedDescription: Authentication failed due to missing or invalid credentials.
Client ID not supported: The provided client ID is not recognized.
Example: server_error_login_401_Client ID is not supported - "zsKFyTytYtZL3hcvQQ7"_1732722263186
409 - ConflictDescription: The request could not be processed due to a conflict with the current state of the resource.
Event already sent: Indicates a duplicate request for an event already processed.
Example: server_error_login_409_Request cannot be processed_1732971102156
429 - Too Many RequestsDescription: The client has sent too many requests in a given amount of time and is being rate-limited.
Rate limit exceeded: Indicates throttling due to excessive requests.
Example: server_error_login_429_ThrottlerException: Too Many Requests_1732721457134

Client errors

Format: client_error_<actionType>_'<message>'_<timestamp>

ErrorDescription and example
'fetch' does not exist on windowDescription: The JavaScript fetch API is not supported in the current environment.
Example: client_error_login_'fetch-api is not supported'_1732723943772
Encryption error (client-side)Description: The client failed to encrypt the request data.
Example: client_error_login_'crypto is not supported'_1732723943772
Unhandled responseDescription: The server accepted the request but returned no action token.
Example: client_error_login_'Unhandled SDK error. Received eventResponse: ...'_1732723943772
Invalid action typeDescription: The client attempted to perform an unsupported or invalid action type.
Example: client_error_'invalid action type - dummyType'_1732723943772

Invalid claimed user ID type errors

Format: invalid_claimed_user_id_type_<claimedUserIdType>_<timestamp>

ErrorDescription and example
Unsupported claimedUserIdTypeDescription: The claimedUserIdType passed in the action options is not a supported value. Supported values are: email, phone_number, account_id, ssn, national_id, passport_number, drivers_license_number, other.
Example: invalid_claimed_user_id_type_username_1754293254357

SDK Disabled errors

Format: disabled_sdk_<disabledReason>_action_<timestamp>

Disabled reasonDescription and example
init_not_calledDescription: The init function wasn't called.
Example: disabled_sdk_init_not_called_action_1754292026552
init_failedDescription: SDK initialization failed.
Example: disabled_sdk_init_failed_action_1754292839934
config_disabledDescription: The SDK was disabled via configuration.
Example: disabled_sdk_config_disabled_action_1754293046441
invalid_paramsDescription: The SDK was initialized with invalid parameters.
Example: disabled_sdk_invalid_params_action_1754293254357
missing_configDescription: The SDK did not receive the configuration, possibly due to blocked requests.
Example: disabled_sdk_missing_config_action_1754293254357

Communication errors

Format: communication_error_<actionType>_'<message>'_<timestamp>

ErrorDescription and example
Encryption error - missing public keyDescription: The encryption process failed because the required public key is missing.
Example: communication_error_login_'Encryption error - missing public key'_1732799565912
Network errorDescription: A network error occurred, possibly due to connectivity issues or timeouts.
Example: communication_error_login_'Failed to fetch'_1732799565912

Unexpected errors

Format: unexpected_error_<actionType>_<timestamp>

ErrorDescription and example
Unexpected errorDescription: An error occurred that does not fall into any predefined category.
Example: unexpected_error_login_1732799565912

Thrown errors for triggerActionEvent

Some conditions reject instead of returning an error string.

ConditionError codeMessage
Either the SDK init was not called, or the call failedNotInitializedtsPlatform not initialized
When the SDK operation fails on an unhandled errorUnknown

getSessionToken() and getSecureSessionToken() errors

On failure, getSessionToken() and getSecureSessionToken() resolve with a disabled_sdk_ error string in place of the token.

SDK Disabled errors for session tokens

Format: disabled_sdk_<disabledReason>_session_<timestamp>

Disabled reasonDescription and example
init_not_calledDescription: The init function wasn't called.
Example: disabled_sdk_init_not_called_session_1754292026552
init_failedDescription: SDK initialization failed.
Example: disabled_sdk_init_failed_session_1754292839934
config_disabledDescription: The SDK was disabled via configuration.
Example: disabled_sdk_config_disabled_session_1754293046441
invalid_paramsDescription: The SDK was initialized with invalid parameters.
Example: disabled_sdk_invalid_params_session_1754293254357
missing_configDescription: The SDK did not receive the configuration, possibly due to blocked requests.
Example: disabled_sdk_missing_config_session_1754293254357
unknownDescription: Returned by getSecureSessionToken() only. The SDK is enabled and initialized, but the token could not be produced.
Example: disabled_sdk_unknown_session_1754293254357

Thrown errors for session tokens

Some conditions reject instead of returning an error string.

ConditionError codeMessage
Either the SDK init was not called, or the call failedNotInitializedtsPlatform not initialized
When the SDK operation fails on an unhandled errorUnknown
enableSessionToken is not set to true in the SDK configuration-Session token is not enabled

Error codes

NotInitialized

• NotInitialized = "not_initialized"

Either the SDK init was not called, or the call failed


Unknown

• Unknown = "unknown"

When the SDK operation fails on an unhandled error