When dialing a peer using invalid peer id over WebSocket transport, the error is sometimes reported as Error::Other instead of Error::PeerIdMismatch. The error string reported is Cannot assign requested address (os error 99).
This is possible to reproduce using https://github.com/dmitry-markin/p2p-probe and passing a multiaddress of a node with /ws protocol.
This has never happened over TCP transport.