Fix GraphQL API error messages
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
a36fd740af
commit
cea8c5a7fe
@ -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 }),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user