import { H as HttpErrorStatusCodeOrNumber, a as HttpExceptionParams, b as HttpErrorStatusCode, c as HttpExceptionParamsWithIssues, d as HttpUnprocessableEntity, e as HttpClientException, f as HttpException, g as HttpServerException } from './HttpClientException-d7s_tdS_.js'; export { h as HttpBadGateway, i as HttpBadRequest, j as HttpConflict, k as HttpExpectationFailed, l as HttpFailedDependency, m as HttpForbidden, n as HttpGatewayTimeout, o as HttpGone, p as HttpImATeapot, q as HttpInsufficientStorage, r as HttpInternalServerError, s as HttpLengthRequired, t as HttpLocked, u as HttpLoopDetected, v as HttpMethodNotAllowed, w as HttpMisdirectedRequest, x as HttpNetworkAuthenticationRequired, y as HttpNotAcceptable, z as HttpNotExtended, A as HttpNotFound, B as HttpNotImplemented, C as HttpPayloadTooLarge, D as HttpPaymentRequired, E as HttpPreconditionFailed, F as HttpPreconditionRequired, G as HttpProxyAuthenticationRequired, I as HttpRangeNotSatisfiable, J as HttpRequestHeaderFieldsTooLarge, K as HttpRequestTimeout, L as HttpServiceUnavailable, M as HttpTooEarly, N as HttpTooManyRequests, O as HttpUnauthorized, P as HttpUnavailableForLegalReasons, Q as HttpUnsupportedMediaType, R as HttpUpgradeRequired, S as HttpUriTooLong, T as HttpValidationIssue, U as HttpVariantAlsoNegotiates, V as HttpVersionNotSupported } from './HttpClientException-d7s_tdS_.js'; interface ErrorWithErrorStatusCode extends Error { statusCode: HttpErrorStatusCodeOrNumber; } type HttpExceptionParamsWithStatus = HttpExceptionParams & { statusCode: HttpErrorStatusCode; }; /** * Object or PlainObject with a indicative statusCode field [4xx,5xx] */ interface ObjectWithErrorStatusCode { statusCode: HttpErrorStatusCodeOrNumber; } type HttpStatusCodesWithIssues = 422; type HttpExceptionParamsFromStatus = T extends HttpStatusCodesWithIssues ? HttpExceptionParamsWithIssues : HttpExceptionParams; type HttpExceptionFromStatus = T extends HttpStatusCodesWithIssues ? HttpUnprocessableEntity : HttpClientException | HttpException | HttpServerException; /** * Create a concrete http exception object from a given http status code. * * If the status does not have an assigned ietf class, it will default * to either HttpClientException or HttpServerException based on ranges * (client: 400-499, server: 500-599). * * At last resort, if the provided status does not meet error range requirements * (400-599), it will create an HttpException with the out-of-scope code (ie: 100, 300, 1099...) * * @param statusCode http status code between 400-599 * @param msgOrParams either a message or an object containing HttpExceptionParams */ declare const createHttpException: (statusCode: T, msgOrParams?: HttpExceptionParamsFromStatus | string) => HttpExceptionFromStatus; /** * Checks if a value is an instanceof Error and has a statusCode field * indicating an error http status (4xx or 5xx) */ declare const isErrorWithErrorStatusCode: (error: unknown) => error is ErrorWithErrorStatusCode; /** * Test whether a value is an instanceof HttpClientException * and its statusCode is in the 4xx range when the parameter * checkStatusCode is true (enabled by default). */ declare const isHttpClientException: (error: unknown, /** * Ensure statusCode is in the client range [>=400, <500], true by default */ checkStatusCode?: boolean) => error is HttpClientException; declare const isHttpErrorStatusCode: (statusCode: unknown) => statusCode is T; /** * Test whether a value is an instanceof HttpException * and its statusCode is in the 4xx and 5xx ranges when the parameter * checkStatusCode is true (enabled by default). */ declare const isHttpException: (error: unknown /** * Ensure statusCode is in the error range [>=400, <600], true by default */, checkStatusCode?: boolean) => error is HttpException; /** * Test whether a value is an instanceof HttpServerException * and its statusCode is in the 5xx range when the parameter * checkStatusCode is true (enabled by default). */ declare const isHttpServerException: (error: unknown, /** * Ensure statusCode is in the server range [>=500, <600], true by default */ checkStatusCode?: boolean) => error is HttpServerException; /** * Check if the provided value is a valid http status code > 99 and <600 * @see isHttpErrorStatusCode to ensure error range [4xx,5xx] */ declare const isHttpStatusCode: (statusCode: unknown) => statusCode is number; /** * Checks if a value is an object (or a plain object) and has a statusCode field * indicating an error http status (4xx or 5xx) */ declare const isObjectWithErrorStatusCode: (objOrPlainObject: unknown) => objOrPlainObject is ObjectWithErrorStatusCode; export { type ErrorWithErrorStatusCode, HttpClientException, HttpErrorStatusCode, HttpException, HttpExceptionParams, type HttpExceptionParamsWithStatus, HttpServerException, HttpUnprocessableEntity, type ObjectWithErrorStatusCode, createHttpException, isErrorWithErrorStatusCode, isHttpClientException, isHttpErrorStatusCode, isHttpException, isHttpServerException, isHttpStatusCode, isObjectWithErrorStatusCode };