Fix GraphQL API error messages
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Lucien Cartier-Tilet 2023-01-17 01:00:36 +01:00
parent a36fd740af
commit cea8c5a7fe
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
1 changed files with 2 additions and 1 deletions

View File

@ -46,9 +46,10 @@ impl std::fmt::Display for DatabaseError {
impl IntoFieldError for DatabaseError {
fn into_field_error(self) -> juniper::FieldError<DefaultScalarValue> {
let short = self.short;
FieldError::new(
self.long,
graphql_value!({ "error": "Connection refused" }),
graphql_value!({ "error": short }),
)
}
}