import { type HttpRequest, HttpResponse } from "../http/index.js"; import type { HttpLayer } from "../layer/index.js"; import type { HttpService } from "../service/index.js"; /** * A {@link Layer} that produces {@link CatchError} services. */ export declare class CatchErrorLayer implements HttpLayer { layer(inner: HttpService): HttpService; } /** * A service that wraps another service and maps any errors occurring * during its invocation to an appropriate HTTP response. */ export declare class CatchError implements HttpService { private readonly inner; constructor(inner: HttpService); invoke(req: HttpRequest): Promise; }