diff options
-rw-r--r-- | rust/src/errors.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rust/src/errors.rs b/rust/src/errors.rs index 95979534..19ba2f82 100644 --- a/rust/src/errors.rs +++ b/rust/src/errors.rs @@ -106,7 +106,8 @@ impl Into<models::ErrorResponse> for FatcatError { // TODO: something more complex? context? models::ErrorResponse { success: false, - error: self.name().unwrap_or("other").to_string(), + // enum variant name, without fields. whew, what a pile + error: format!("{:?}", self).split('(').collect::<Vec<&str>>()[0].to_string(), message: self.to_string(), } } |