Fix GraphQL API error messages
All checks were successful
continuous-integration/drone/push Build is passing

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

View File

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