UNPKG

@wristband/nextjs-auth

Version:

SDK for integrating your Next.js application with Wristband. Handles user authentication, session management, and token management.

26 lines (25 loc) 909 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WristbandError = void 0; /** * Represents a structured error from the Wristband SDK. * * Wraps an error code, an optional description, and optionally the original underlying Error. */ class WristbandError extends Error { /** * Creates a new WristbandError instance. * * @param code - A short error code or identifier. * @param errorDescription - Optional human-readable description of the error. * @param originalError - Optional original Error instance that caused this error. */ constructor(code, errorDescription, originalError) { super(errorDescription || code); this.name = 'WristbandError'; this.code = code; this.errorDescription = errorDescription; this.originalError = originalError; } } exports.WristbandError = WristbandError;