diff options
Diffstat (limited to 'server/src/routes/ui/error.rs')
-rw-r--r-- | server/src/routes/ui/error.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/server/src/routes/ui/error.rs b/server/src/routes/ui/error.rs index 190650f..b538a06 100644 --- a/server/src/routes/ui/error.rs +++ b/server/src/routes/ui/error.rs @@ -36,7 +36,6 @@ pub fn r_api_catch<'a>(status: Status, _request: &Request) -> Value { pub type MyResult<T> = Result<T, MyError>; -#[derive(Debug)] pub struct MyError(pub anyhow::Error); impl<'r> Responder<'r, 'static> for MyError { @@ -61,6 +60,12 @@ impl<'r> Responder<'r, 'static> for MyError { } } +impl std::fmt::Debug for MyError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_fmt(format_args!("{:?}", self.0)) + } +} + impl Display for MyError { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { self.0.fmt(f) |