Simplify
This commit is contained in:
parent
1461b41a36
commit
7f3ec69cf6
7 changed files with 236 additions and 158 deletions
|
|
@ -5,8 +5,6 @@ use axum::response::{IntoResponse, Response};
|
|||
pub enum AppError {
|
||||
NotFound,
|
||||
Db(rusqlite::Error),
|
||||
WriterDead,
|
||||
WriterDroppedReply,
|
||||
VolumeError(String),
|
||||
NoHealthyVolume,
|
||||
}
|
||||
|
|
@ -25,8 +23,6 @@ impl std::fmt::Display for AppError {
|
|||
match self {
|
||||
AppError::NotFound => write!(f, "not found"),
|
||||
AppError::Db(e) => write!(f, "database error: {e}"),
|
||||
AppError::WriterDead => write!(f, "writer dead"),
|
||||
AppError::WriterDroppedReply => write!(f, "writer dropped reply"),
|
||||
AppError::VolumeError(msg) => write!(f, "volume error: {msg}"),
|
||||
AppError::NoHealthyVolume => write!(f, "no healthy volume available"),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue