import type { XmlDocument, XmlElement } from '@rgrove/parse-xml'; export declare class EndpointError extends Error { readonly httpStatus?: number; readonly isCrossOriginRelated?: boolean; constructor(message: string, httpStatus?: number, isCrossOriginRelated?: boolean); } /** * Representation of an Exception reported by an OWS service * * This is usually contained in a ServiceExceptionReport or ExceptionReport * document and represented as a ServiceException or Exception element */ export declare class ServiceExceptionError extends Error { readonly requestUrl?: string; readonly code?: string; readonly locator?: string; readonly response?: XmlDocument; /** * Constructor * @param message Error message * @param requestUrl URL which resulted in the ServiceException * @param code Optional ServiceException code * @param locator Optional ServiceException locator * @param response Optional response content received */ constructor(message: string, requestUrl?: string, code?: string, locator?: string, response?: XmlDocument); } /** * Parse a ServiceException element to a ServiceExceptionError * @param serviceException ServiceException element * @param url URL from which the ServiceException was generated */ export declare function parse(serviceException: XmlElement, url?: string): ServiceExceptionError; /** * Check the response for a ServiceExceptionReport and if present throw one * @param response Response to check * @param url URL from which response was generated */ export declare function check(response: XmlDocument, url?: string): XmlDocument; /** * This transforms an error object into a JSON-serializable object to be * transferred from a worker */ export declare function encodeError(error: Error): Record; /** * Recreates an error object */ export declare function decodeError(error: Record): Error; //# sourceMappingURL=errors.d.ts.map