diff --git a/lib/src/err/mod.rs b/lib/src/err/mod.rs index 9d8d3545..f8861aa1 100644 --- a/lib/src/err/mod.rs +++ b/lib/src/err/mod.rs @@ -234,6 +234,12 @@ pub enum Error { Decode(#[from] DecodeError), } +impl From for String { + fn from(e: Error) -> String { + e.to_string() + } +} + #[cfg(feature = "kv-echodb")] impl From for Error { fn from(e: EchoDBError) -> Error { diff --git a/src/err/mod.rs b/src/err/mod.rs index 342f5f60..18045988 100644 --- a/src/err/mod.rs +++ b/src/err/mod.rs @@ -38,6 +38,12 @@ pub enum Error { impl warp::reject::Reject for Error {} +impl From for String { + fn from(e: Error) -> String { + e.to_string() + } +} + impl From for Error { fn from(_: Base64Error) -> Error { Error::InvalidAuth