How You Interpret Error Codes

When a customer attempts to log in using pass-through authentication, there are a number of factors that can cause login failure, including an invalid user name or password, a duplicate email address in the database, and problems with the PTA string.

To help you debug login errors or provide informational messages, customers can be redirected to a custom page displaying an error code and session information when an error occurs.

The URL of the page where customers are redirected is specified in the PTA_ERROR_URL configuration setting. To display an error code, the URL must be appended with the %error_code% variable. Session information can be provided in the form of a base64-encoded string if the %session% variable is also appended. Session information displays only if login tracking cookies are disabled on the customer’s computer.

Note: The PTA_ERROR_URL configuration setting is blank by default. If you do not specify a value for the setting, customers are redirected to the URL in the PTA_EXTERNAL_LOGIN_URL configuration setting when a login error occurs. If you choose not to use PTA_ERROR_URL, you can append the %error_code% and %session% variables to the end of the URL specified in PTA_EXTERNAL_LOGIN_URL. See How You Define the External Login Page.

For example, assume that you set the configuration setting value to:


If login fails because the password exceeds the 20-character limit, the URL that is returned is:


The error code, 15 in this example, lets you know what caused the failure.

The table describes error codes found in the URL. These codes are the same whether the %error_code% variable is used in the PTA_ERROR_URL or the PTA_EXTERNAL_LOGIN_URL configuration setting.

Table 1. Error Code Descriptions
Error Code Description


The PTA string parameter was not found. This parameter contains all of the encoded PTA information in the URL, so it must be present to log in.


PTA information after pre_pta_decode hook was not in the correct format. A string or an array was expected, but something else was received.


PTA string could not be Base 64 decoded. There was an error within the string that caused the decoding process to fail.


One of the PTA string parameters was not well formed. For example, it did not contain “p_” or was missing an “=” separator between the key and value.


The p_userid string was passed in, but it did not have a value. This pair is required for login.


The value of the p_li_passwd pair was incorrect. This error applies only if no value is set for the PTA_ENCRYPTION_METHOD configuration setting.


The specified credentials were invalid.


Login failed because PTA is not enabled for the interface.


Data decryption failed.


Login failed because PTA_ENCRYPTION_METHOD does not contain a valid value.


Login failed because the PTA_ENCRYPTION_PADDING configuration setting does not contain a valid value.


Login failed because the PTA_ENCRYPTION_KEYGEN configuration setting does not contain a valid value.


Login failed because the PTA_IGNORE_CONTACT_PASSWORD configuration setting is enabled, but no encryption scheme has been set in PTA_ENCRYPTION_METHOD.


Login failed because the format of the data after the pre_pta_convert hook was not an array.


Login failed because the password exceeded the 20-character maximum length.


Login failed because the PTA token expired and is no longer valid. A new token must be generated to authenticate the customer.


Login failed because two or more email addresses have the same value.