export class ResponseError extends Error {
    #status;
    get status() {
        return this.#status;
    }
    #statusText;
    get statusText() {
        return this.#statusText;
    }
    #url;
    get url() {
        return this.#url;
    }
    constructor(message, { status, statusText, url, }) {
        super(message);
        this.#status = status;
        this.#statusText = statusText;
        this.#url = url;
    }
    toJSON() {
        return {
            name: this.constructor.name,
            message: this.message,
            status: this.#status,
            statusText: this.#statusText,
            url: this.#url,
        };
    }
}
//# sourceMappingURL=ResponseError.js.map