"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConfigurationError = exports.ExternalApiError = exports.AppError = void 0;
class AppError extends Error {
    code;
    isUserSafe;
    cause;
    constructor(message, code, isUserSafe = false, cause) {
        super(message);
        this.code = code;
        this.isUserSafe = isUserSafe;
        this.cause = cause;
        this.name = "AppError";
    }
}
exports.AppError = AppError;
class ExternalApiError extends AppError {
    constructor(message, code, cause) {
        super(message, code, false, cause);
        this.name = "ExternalApiError";
    }
}
exports.ExternalApiError = ExternalApiError;
class ConfigurationError extends AppError {
    constructor(message) {
        super(message, "CONFIGURATION_ERROR", true);
        this.name = "ConfigurationError";
    }
}
exports.ConfigurationError = ConfigurationError;
