Skip to content
1 min read · 188 words

Interface: WireError ​

Defined in: src/batteries/isolation/protocol.ts:42

An error as it crosses the wire. message/name/stack are ALWAYS present baseline string fields (never omitted, regardless of encoder availability) so error-classification-by-message-signature always works even when the encoder is unavailable or fails to decode. nhtio carries the @nhtio/encoder-encoded original Error instance when BOTH sides advertised encoderAvailable on ready — the receiving side decodes it for full fidelity (custom error subclasses, extra properties) and falls back silently to the baseline fields on any decode failure.

Properties ​

PropertyTypeDescriptionDefined in
messagestringBaseline error message — always populated, even when nhtio is absent or fails to decode.src/batteries/isolation/protocol.ts:44
namestringBaseline error name (e.g. 'TypeError') — always populated.src/batteries/isolation/protocol.ts:46
nhtio?string@nhtio/encoder-encoded original Error, when both sides have the encoder.src/batteries/isolation/protocol.ts:50
stack?stringBaseline stack trace, when the original error had one — always forwarded as-is (never re-derived).src/batteries/isolation/protocol.ts:48