"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const error_1 = __importDefault(require("@pnpm/error"));
class BadTarballError extends error_1.default {
    constructor(opts) {
        const message = `Actual size (${opts.receivedSize}) of tarball (${opts.tarballUrl}) did not match the one specified in 'Content-Length' header (${opts.expectedSize})`;
        super('BAD_TARBALL_SIZE', message, {
            attempts: opts === null || opts === void 0 ? void 0 : opts.attempts,
        });
        this.expectedSize = opts.expectedSize;
        this.receivedSize = opts.receivedSize;
    }
}
exports.default = BadTarballError;
//# sourceMappingURL=BadTarballError.js.map