p2p/protocol/identify/identify_exceptions library
Exceptions specific to the Identify protocol.
These typed exceptions allow callers to catch and handle specific identify failure scenarios differently.
Functions
-
isTimeoutException(
Object exception) → bool - Helper function to determine if an exception is a timeout-related error.
-
wrapIdentifyException(
{required PeerId peerId, required Object exception, Duration? timeout}) → IdentifyException - Helper function to wrap a generic exception into an appropriate IdentifyException subtype.
Exceptions / Errors
- IdentifyException
- Base class for all identify-related exceptions.
- IdentifyProtocolException
- Exception thrown when identify protocol returns invalid/malformed data.
- IdentifyStreamException
- Exception thrown when identify stream negotiation fails.
- IdentifyTimeoutException
- Exception thrown when identify protocol negotiation times out.