diff --git a/src/db/mod.rs b/src/db/mod.rs index 20b60b4..2ddf33a 100644 --- a/src/db/mod.rs +++ b/src/db/mod.rs @@ -46,9 +46,10 @@ impl std::fmt::Display for DatabaseError { impl IntoFieldError for DatabaseError { fn into_field_error(self) -> juniper::FieldError { + let short = self.short; FieldError::new( self.long, - graphql_value!({ "error": "Connection refused" }), + graphql_value!({ "error": short }), ) } }