/*! * Copyright (c) 2020 Ville de Montreal. All rights reserved. * Licensed under the MIT license. * See LICENSE file in the project root for full license information. */ /** * Error thrown by any IHttpClient implementation, either when wrapping a connection error, * or when the http response code is not within 200 to 299. */ export declare class HttpClientError extends Error { readonly code?: string | undefined; readonly statusCode?: number | undefined; readonly statusMessage?: string | undefined; readonly body?: any | undefined; readonly innerError?: any | undefined; readonly response?: any | undefined; /** * Creates a new instance of a HttpClientError * @param message the error message * @param code the standardized error code * @param statusCode the HTTP status code * @param statusMessage the display text for the HTTP status code * @param body the body returned in the HTTP Response that failed * @param innerError the original error message wrapped by this error * @param response the original HTTP response object */ constructor(message: string, code?: string | undefined, statusCode?: number | undefined, statusMessage?: string | undefined, body?: any | undefined, innerError?: any | undefined, response?: any | undefined); /** * returns the properties that are suitable to a JSON serialization. * @remarks it will skip the response property which might be a complex object * (such as the response from the http module) */ toJSON(): any; }