Skip to content

Commit 435ffa0

Browse files
authored
Merge pull request #2423 from dusk-network/graphql-ser
rusk: add serialization to graphql error returned to clients
2 parents 7f96620 + 92d16f2 commit 435ffa0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rusk/src/lib/http/chain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl RuskNode {
146146
let gql_res = schema.execute(gql_query).await;
147147
let async_graphql::Response { data, errors, .. } = gql_res;
148148
if !errors.is_empty() {
149-
return Err(anyhow::anyhow!("{errors:?}"));
149+
return Err(anyhow::anyhow!(serde_json::to_value(errors)?));
150150
}
151151
let data = serde_json::to_value(&data)
152152
.map_err(|e| anyhow::anyhow!("Cannot parse response {e}"))?;

0 commit comments

Comments
 (0)