Expand description
Error types for the ESPHome native API.
The API distinguishes errors by what a consumer would do differently about them rather than by where they occurred:
Error::Disconnected— the session ended. This is the normal way a connection terminates; most consumers treat it as informational, not a failure.FrameError::UnknownMessageType— a valid frame carrying a message type this build does not know (e.g. a newer ESPHome release). It is safe to skip and keep the connection alive; the read loop does exactly that internally.- Every other
FrameError/HandshakeError/Error::Iovariant is a genuine fault that tears the connection down.
Enums§
- Disconnect
Reason - Why a connection ended.
- Error
- Top-level error returned by the ESPHome native API.
- Frame
Error - A frame arrived but could not be decoded into a [
crate::parser::ProtoMessage]. - Handshake
Error - Failures while establishing a connection or performing the encryption handshake. All of these are returned before the read/write loops start.