EdhocTransferException
class EdhocTransferException(message: String, val response: CoapResponse? = null) : EdhocException(source)
An EDHOC handshake over CoAP failed in the transfer, not in EDHOC itself: the server answered a request to its EDHOC resource with something that is neither a 2.04 nor an EDHOC error response (RFC 9528 Appendix A.2), such as a 4.04 from a server without one, or the peers could not agree on a cipher suite within a few rounds of RFC 9528 §6.3.
It is an EdhocException, so one catch covers every way EdhocClientHandshake fails for the peer's part. As for dev.kcoap.edhoc.EdhocPeerErrorException, there is nothing to answer: errorMessage is null.