Skip to content

API Reference


API Reference / AuthenticationError

Class: AuthenticationError

Defined in: src/errors/AuthenticationError.ts:10

A token generation or renewal call was refused.

Carries the broker's own errorMessage where one was returned, since "Invalid PIN" and "TOTP expired" need different fixes and the HTTP status alone does not distinguish them.

Extends

Constructors

Constructor

new AuthenticationError(context, message, options?): AuthenticationError

Defined in: src/errors/AuthenticationError.ts:14

Parameters

context

string

message

string

options?
status?

number

details?

unknown

cause?

unknown

Returns

AuthenticationError

Overrides

DhanError.constructor

Properties

context

readonly context: string

Defined in: src/errors/AuthenticationError.ts:12

The auth operation that failed, e.g. "GenerateAccessToken".


code

readonly code: string

Defined in: src/errors/DhanError.ts:2

Inherited from

DhanError.code


status?

readonly optional status?: number

Defined in: src/errors/DhanError.ts:3

Inherited from

DhanError.status


details?

readonly optional details?: unknown

Defined in: src/errors/DhanError.ts:4

Inherited from

DhanError.details


cause?

readonly optional cause?: unknown

Defined in: src/errors/DhanError.ts:5

Inherited from

DhanError.cause

Community project — not affiliated with Dhan. MIT License.