use thiserror::Error;
#[derive(Debug, Error)]
#[non_exhaustive]
pub enum ChatError {
#[error("chat client build failed: {message}")]
Build {
message: String,
},
#[error(
"chat HTTP error{}: {message}",
.status.map(|s| format!(" ({s})")).unwrap_or_default()
)]
Http {
status: Option<u16>,
message: String,
timed_out: bool,
},
#[error("chat response was malformed")]
MalformedResponse,
}