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 {
|
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 }),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user