Previous Topic: CreateOfflineKeyBag()Next Topic: GetErrorMessage()


GetErrorCode()

Retrieves the error code for the last error encountered by the SDK.

Syntax

int GetErrorCode()

Returns

An error code.

Discussion

Possible values include:

Error Code

Description

ERR_NONE (0)

 

ERR_BAD_PIN (1)

The user entered an invalid PIN.

ERR_GUI_CANCEL (2)

The user cancelled authentication before it completed.

ERR_MISSING_WALLET (3)

The specified Arcot card was not found.

ERR_MISSING_CARD (4)

The specified card was not found.

ERR_GUI_RENEW (5)

The user choose to renew instead of authentication.

ERR_BAD_WALLET (6)

The Arcot card is invalid.

ERR_INVALID_PUBLIC_KEY (7)

The public key you are attempting to use is invalid.

ERR_MISSING_SERVER_NAME (8)

The authentication server could not be found.

ERR_INITCONN (9)

The connection between the client and the application server failed to initialize.

ERR_CONNECT (10)

The client failed to connect to the authentication server.

ERR_CREATE_SYSTEM_ CONTEXT (11)

Could not create an Arcot system context.

ERR_CREATE_CONTEXT (12)

Could not create an Arcot context.

ERR_PROTOCOL (13)

An Arcot authentication protocol error.

ERR_AAPLIB (14)

An Arcot authentication library error.

ERR_AUTHENTICATE (15)

The authentication failed.

ERR_COOKIE (16)

The cookie placed in the browser failed to authenticate.

ERR_ILLEGAL_CHALLENGE (17)

The challenge sent to the authentication server failed.

ERR_UNKNOWN (18)

An unknown error occurred during the authentication process.

ERR_BAD_WALLET_FOLDER (19)

Error in the folder containing the wallet.

ERR_ILLEGAL_DOMAIN_ACCESS (20)

An error occurred while accessing the domain.

ERR_INVALID_CREDENTIAL_FILTER (21)

The user credential was invalid after the filtering result.

ERR_BAD_APPCTX (22)

The application context is invalid.

ERR_BAD_ALIAS (23)

The alias is invalid.

ERR_BAD_WALLET_OR_ALIAS (24)

The alias or the wallet name is invalid.

ERR_INVALID_STORAGE (30)

Storage medium mentioned is invalid.

ERR_STORAGE_UNAVAILABLE (31)

Storage mentioned is not available.

ERR_STORAGE_ERROR (32)

Error occurred while storing the ArcotID PKI.

ERR_NO_SUCH_WALLET_ERROR (33)

Mentioned wallet does not exist.

Example

<HTML>
<HEAD>
<TITLE>Authentication Failure</TITLE>
</HEAD>

<BODY>
<H2>Authentication Failure!</H2>

<SCRIPT LANGUAGE="JavaScript">

var arcotClient = new ArcotClient();
var errorcode = arcotClient.GetErrorCode();
if (errorcode == 1)
{
    document.write("<P>Invalid PIN</P>");
}
if (errorcode == 3)
{
    document.write("<P>Invalid User Name</P>");
}