/**
 * Thrown when a non-200 response is returned from the server.
 */
export class ServerError extends Error {
    /**
     * The server response.
     */
    response;
    /**
     * The status code returned from the server.
     */
    statusCode;
    /**
     * The JSON-parsed response body or raw body text if the text is not JSON
     * parseable.
     */
    result;
    constructor(message, options) {
        super(message);
        this.name = "ServerError";
        this.response = options.response;
        this.statusCode = options.response.status;
        this.result = options.result;
        Object.setPrototypeOf(this, ServerError.prototype);
    }
}
//# sourceMappingURL=ServerError.js.map
