We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7cc0f5 commit bd4198aCopy full SHA for bd4198a
common/src/queries/utils.rs
@@ -33,11 +33,9 @@ where
33
T: Serialize,
34
{
35
let data = query_state(context, topic, request_msg, |response| {
36
- extractor(response).unwrap_or_else(|e| {
37
- Err(QueryError::internal_error(format!(
38
- "Unexpected response message type while calling {topic}"
39
- )))
40
- })
+ extractor(response).ok_or_else(Err(QueryError::internal_error(format!(
+ "Unexpected response message type while calling {topic}"
+ ))))
41
})
42
.await?;
43
0 commit comments