NativeAuthError class

Extends

AuthError

Constructors

NativeAuthError(string, string, OSError)

Properties

ext

Inherited Properties

correlationId

CorrelationId associated with the error

errorCode

Short string denoting error

errorMessage

Detailed description of error

message
name
stack
subError

Describes the subclass of an error

Methods

createError(string, string, OSError)

Create the appropriate error object based on the WAM status code.

createTokensNotFoundInCacheError()

Creates a tokens not found error when the internal cache look up fails

createUserSwitchError()

Creates user switch error when the user chooses a different account in the native broker prompt

isFatal()

These errors should result in a fallback to the 'standard' browser based auth flow.

Inherited Methods

createPostRequestFailed(string)

Creates an error for post request failures.

createUnexpectedError(string)

Creates an error that is thrown when something unexpected happens in the library.

setCorrelationId(string)

Constructor Details

NativeAuthError(string, string, OSError)

new NativeAuthError(errorCode: string, description: string, ext?: OSError)

Parameters

errorCode

string

description

string

ext
OSError

Property Details

ext

ext: OSError | undefined

Property Value

OSError | undefined

Inherited Property Details

correlationId

CorrelationId associated with the error

correlationId: string

Property Value

string

Inherited From AuthError.correlationId

errorCode

Short string denoting error

errorCode: string

Property Value

string

Inherited From AuthError.errorCode

errorMessage

Detailed description of error

errorMessage: string

Property Value

string

Inherited From AuthError.errorMessage

message

message: string

Property Value

string

Inherited From Error.message

name

name: string

Property Value

string

Inherited From Error.name

stack

stack?: string

Property Value

string

Inherited From Error.stack

subError

Describes the subclass of an error

subError: string

Property Value

string

Inherited From AuthError.subError

Method Details

createError(string, string, OSError)

Create the appropriate error object based on the WAM status code.

static function createError(code: string, description: string, ext?: OSError): AuthError

Parameters

code

string

description

string

ext
OSError

Returns

AuthError

createTokensNotFoundInCacheError()

Creates a tokens not found error when the internal cache look up fails

static function createTokensNotFoundInCacheError(): NativeAuthError

Returns

NativeAuthError: tokensNotFoundInCache

createUserSwitchError()

Creates user switch error when the user chooses a different account in the native broker prompt

static function createUserSwitchError(): NativeAuthError

Returns

isFatal()

These errors should result in a fallback to the 'standard' browser based auth flow.

function isFatal(): boolean

Returns

boolean

Inherited Method Details

createPostRequestFailed(string)

Creates an error for post request failures.

static function createPostRequestFailed(errDesc: string): AuthError

Parameters

errDesc

string

Returns

AuthError

Inherited From AuthError.createPostRequestFailed

createUnexpectedError(string)

Creates an error that is thrown when something unexpected happens in the library.

static function createUnexpectedError(errDesc: string): AuthError

Parameters

errDesc

string

Returns

AuthError

Inherited From AuthError.createUnexpectedError

setCorrelationId(string)

function setCorrelationId(correlationId: string)

Parameters

correlationId

string

Inherited From AuthError.setCorrelationId