import { PolyesterError } from "./errors.js"; import { ConnectError, Interceptor, Transport } from "@connectrpc/connect"; //#region src/shared/connect-error-mapping.d.ts /** * Maps a `ConnectError` from the Polyester backend onto the typed * {@link PolyesterError} tree. The original error is preserved as `cause`. */ declare function connectErrorToPolyesterError(ce: ConnectError): PolyesterError; /** * Converts any RPC-layer failure into its typed SDK error. Abort errors and * caller-cancelled requests pass through unchanged, as do errors that are * already typed (e.g. a `NetworkError` from the SDK fetch wrapper). */ declare function toPolyesterError(err: unknown): unknown; /** * Interceptor that converts every RPC failure (unary and streaming) into the * typed {@link PolyesterError} hierarchy. Installed outermost by * `createTransports`, so callers of SDK services always see typed errors. */ declare function createErrorMappingInterceptor(): Interceptor; //#endregion export { connectErrorToPolyesterError, createErrorMappingInterceptor, toPolyesterError }; //# sourceMappingURL=connect-error-mapping.d.ts.map