//#region src/adapters/errors.d.ts /** * The kind of failure an adapter ran into while bridging messages. * * - `parse` — an inbound message could not be parsed/deserialized. The * transport is still alive; only this one message was lost. * - `fatal` — an unrecoverable transport error (load / syntax / runtime * `error` event). The context is aborted and in-flight * invokes reject. * - `messageerror` — a message could not be deserialized by the transport * itself (structured-clone failure). The context is aborted. */ type AdapterErrorKind = 'parse' | 'fatal' | 'messageerror'; /** * Normalized payload emitted by every adapter when it encounters an error. * * `error` is always unwrapped to a real `Error` (with a stack where one is * available) so subscribers never have to dig a thrown value out of an * `ErrorEvent`. The `kind` discriminator tells callers whether the transport * is still usable (`parse`) or has been torn down (`fatal` / `messageerror`). * * For `messageerror`, `message` carries the original (undeserializable) * `MessageEvent`/message so the failed payload isn't silently dropped. */ interface AdapterErrorPayload { kind: AdapterErrorKind; error: Error; message?: unknown; } //#endregion export { AdapterErrorPayload as n, AdapterErrorKind as t }; //# sourceMappingURL=errors-BKTILLCx.d.mts.map