Skip to main content

Class: PKCEError

Defined in: src/auth/errors.ts:358

PKCE validation error.

Remarks

Thrown when PKCE code challenge/verifier validation fails. HTTP mapping: 400 Bad Request

Extends

Constructors

new PKCEError()

new PKCEError(pkceError, message): PKCEError

Defined in: src/auth/errors.ts:372

Creates a new PKCEError.

Parameters

pkceError

Specific error type

"invalid_verifier" | "missing_challenge" | "method_not_supported"

message

string

Error message

Returns

PKCEError

Overrides

ChiveError.constructor

Properties

cause?

readonly optional cause: Error

Defined in: src/types/errors.ts:71

Original error that caused this error (if any).

Remarks

Error chaining allows tracking the full error context through multiple layers of the application. Useful for debugging complex error scenarios.

Example

try {
await fetchData();
} catch (err) {
throw new ValidationError('Failed to validate data', 'field', 'required', err as Error);
}

Inherited from

ChiveError.cause


code

readonly code: "PKCE_ERROR" = 'PKCE_ERROR'

Defined in: src/auth/errors.ts:359

Machine-readable error code.

Remarks

Error codes are unique identifiers for error types, enabling programmatic error handling (switch statements, error maps), error tracking in monitoring systems, and client-side error translation (i18n).

Overrides

ChiveError.code


pkceError

readonly pkceError: "invalid_verifier" | "missing_challenge" | "method_not_supported"

Defined in: src/auth/errors.ts:364

Specific PKCE error.