use thiserror::Error;
#[derive(Debug, Error)]
pub enum NeocitiesErr {
#[error("invalid command")]
InvalidCommand,
#[error("invalid argument")]
InvalidArgument,
#[error("invalid path")]
InvalidPath,
#[error("missing username: check environment variables")]
MissingUser,
#[error("missing password: check environment variables")]
MissingPassword,
#[error("file at specified path does not exist")]
MissingFile,
#[error(transparent)]
SerdeDeserializationError(#[from] serde_json::Error),
#[error(transparent)]
HttpRequestError(#[from] Box<dyn std::error::Error>),
#[error(transparent)]
StdIoError(#[from] std::io::Error),
#[error(transparent)]
FromUtf8Error(#[from] std::string::FromUtf8Error),
#[error(transparent)]
ParseUrlError(#[from] url::ParseError),
#[error(transparent)]
ParseDateError(#[from] chrono::ParseError),
#[error(transparent)]
TryFromIntError(#[from] std::num::TryFromIntError),
#[error(transparent)]
SystemTimeError(#[from] std::time::SystemTimeError),
}