/*! @azure/msal-node-extensions v1.5.17 2025-07-08 */
'use strict';
import { Constants } from '../utils/Constants.mjs';

/*! @azure/msal-common v15.8.1 2025-07-08 */
/**
 * General error class thrown by the MSAL.js library.
 */
class AuthError extends Error {
    constructor(errorCode, errorMessage, suberror) {
        const errorString = errorMessage
            ? `${errorCode}: ${errorMessage}`
            : errorCode;
        super(errorString);
        Object.setPrototypeOf(this, AuthError.prototype);
        this.errorCode = errorCode || Constants.EMPTY_STRING;
        this.errorMessage = errorMessage || Constants.EMPTY_STRING;
        this.subError = suberror || Constants.EMPTY_STRING;
        this.name = "AuthError";
    }
    setCorrelationId(correlationId) {
        this.correlationId = correlationId;
    }
}

export { AuthError };
//# sourceMappingURL=AuthError.mjs.map
