use thiserror::Error;
#[derive(Error, Debug)]
pub enum ServerError {
#[error("internal server error")]
InternalServerError,
#[error("info_hash is either missing or invalid")]
InvalidInfoHash,
#[error("info_hash unknown")]
UnknownInfoHash,
#[error("could not find remote address")]
AddressNotFound,
#[error("torrent has no peers")]
NoPeersFound,
#[error("torrent not on whitelist")]
TorrentNotWhitelisted,
#[error("torrent blacklist")]
TorrentBlacklisted,
#[error("unknown key")]
UnknownKey,
#[error("peer not authenticated")]
PeerNotAuthenticated,
#[error("invalid authentication key")]
PeerKeyNotValid,
#[error("exceeded info_hash limit")]
ExceededInfoHashLimit,
#[error("bad request")]
BadRequest,
#[error("maintenance mode enabled, please try again later")]
MaintenanceMode,
}