mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-08 13:53:13 +00:00
Common error type and admin error type that uses it
This commit is contained in:
@@ -166,6 +166,10 @@ impl Error {
|
||||
_ => "InvalidRequest",
|
||||
}
|
||||
}
|
||||
|
||||
pub fn bad_request<M: ToString>(msg: M) -> Self {
|
||||
Self::BadRequest(msg.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
impl ApiError for Error {
|
||||
|
||||
Reference in New Issue
Block a user