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-canceled requests pass through unchanged, as do errors that are * already typed (e.g. a `NetworkError` from the SDK fetch wrapper). * `AbortSignal.timeout()` expiries become {@link TimeoutError}, whether the * timeout signal was passed by the caller or added by an interceptor. Prefer the * `timeoutMs` request option, which Connect reports as `DeadlineExceeded`. */ 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