export class SkimlyError extends Error {
    constructor(message, status = 500, code, data) {
        super(message);
        this.name = 'SkimlyError';
        this.status = status;
        this.code = code;
        this.data = data;
    }
}
export class SkimlyHTTPError extends SkimlyError {
    constructor(status, statusText, body) {
        super(`HTTP ${status} ${statusText}`, status, 'HTTP_ERROR', body);
        this.name = 'SkimlyHTTPError';
    }
}
export class SkimlyNetworkError extends SkimlyError {
    constructor(message = 'Network/timeout error', cause) {
        // Keep 503 semantics so upstream can decide to retry if desired
        super(message, 503, 'NETWORK_ERROR', cause);
        this.name = 'SkimlyNetworkError';
    }
}
