pub use thiserror::Error; #[derive(Error, Debug)] pub enum ChatError { #[error("protocol error: {0:?}")] Protocol(String), #[error("Failed to decode payload: {0}")] DecodeError(#[from] prost::DecodeError), #[error("incorrect bundle value: {0:?}")] UnexpectedPayload(String), #[error("unexpected payload contents: {0}")] BadBundleValue(String), #[error("handshake initiated with a unknown ephemeral key")] UnknownEphemeralKey(), }