PeerIdentityRejectedException

class PeerIdentityRejectedException(val endpoint: String, val reason: String) : Exception

A fabric refused an identity a remote announced for itself.

Raised where peer-supplied bytes are turned into a PeerId and the result is not admissible — a blank id, this peer's own PeerId, an id a different device already holds, or bytes that are not valid UTF-8 at all. The connection carrying it is not a peer and the handshake fails with this rather than resolving onto a fabricated identity (#1821).

The message names the reason, never the announced bytes: they are attacker-controlled and may be arbitrary, and the endpoint the fabric already knows is the useful half for correlating a refusal with a log line.

Constructors

Link copied to clipboard
constructor(endpoint: String, reason: String)

Properties

Link copied to clipboard
expect open val cause: Throwable?
Link copied to clipboard

The fabric's own handle for the connection whose announcement was refused.

Link copied to clipboard
expect open val message: String?
Link copied to clipboard

Why the announcement was refused, in the fabric's own words.