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

This commit is contained in:
2023-01-17 01:00:36 +01:00
parent a36fd740af
commit cea8c5a7fe

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 }),
)
}
}