"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FetchError = void 0;
const lodash_1 = require("lodash");
class FetchError extends Error {
    constructor(statusCode, statusText, responseBody) {
        super(`${statusCode} ${statusText}`);
        this.statusCode = statusCode;
        this.statusText = statusText;
        this.responseBody = (0, lodash_1.isEmpty)(responseBody)
            ? ''
            : JSON.stringify(responseBody);
    }
}
exports.FetchError = FetchError;
//# sourceMappingURL=errors.js.map