Skip to main content

MandaitorAuthError

@mandaitor/sdk


@mandaitor/sdk / MandaitorAuthError

Class: MandaitorAuthError

Defined in: @mandaitor/sdk/dist/errors.d.ts:83

Thrown when the API returns a 401 Unauthorized response.

Extends

Constructors

Constructor

new MandaitorAuthError(code, message, requestId?): MandaitorAuthError

Defined in: @mandaitor/sdk/dist/errors.d.ts:85

Parameters

code

string

message

string

requestId?

string

Returns

MandaitorAuthError

Overrides

MandaitorApiError.constructor

Properties

cause?

optional cause?: unknown

Defined in: .pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts:24

Inherited from

MandaitorApiError.cause


code

readonly code: string

Defined in: @mandaitor/sdk/dist/errors.d.ts:47

Machine-readable error code from ErrorCodes

Inherited from

MandaitorApiError.code


message

message: string

Defined in: .pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1075

Inherited from

MandaitorApiError.message


name

readonly name: "MandaitorAuthError" = "MandaitorAuthError"

Defined in: @mandaitor/sdk/dist/errors.d.ts:84

Overrides

MandaitorApiError.name


requestId?

readonly optional requestId?: string

Defined in: @mandaitor/sdk/dist/errors.d.ts:49

Optional request ID for support debugging

Inherited from

MandaitorApiError.requestId


stack?

optional stack?: string

Defined in: .pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from

MandaitorApiError.stack


status

readonly status: number

Defined in: @mandaitor/sdk/dist/errors.d.ts:45

HTTP status code (e.g. 400, 404, 500)

Inherited from

MandaitorApiError.status

Accessors

isClientError

Get Signature

get isClientError(): boolean

Defined in: @mandaitor/sdk/dist/errors.d.ts:61

Returns true if this is a client error (4xx)

Returns

boolean

Inherited from

MandaitorApiError.isClientError


isRetryable

Get Signature

get isRetryable(): boolean

Defined in: @mandaitor/sdk/dist/errors.d.ts:63

Returns true if this is a server error (5xx) — safe to retry

Returns

boolean

Inherited from

MandaitorApiError.isRetryable

Methods

toJSON()

toJSON(): object

Defined in: @mandaitor/sdk/dist/errors.d.ts:65

Structured JSON representation for logging

Returns

object

code

code: string

message

message: string

name

name: string

requestId

requestId: string | undefined

status

status: number

Inherited from

MandaitorApiError.toJSON