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 b67e3ad commit 82dd985Copy full SHA for 82dd985
pub-sub-client/src/error/mod.rs
@@ -1,5 +1,6 @@
1
use reqwest::Response;
2
use serde_json::Value;
3
+use std::convert::identity;
4
use std::error::Error as StdError;
5
6
#[derive(Debug, thiserror::Error)]
@@ -47,7 +48,7 @@ impl Error {
47
48
.map(|v| v["error"]["message"].to_string())
49
.map_err(|e| format!("Failed to parse error response: {e}"))
50
})
- .unwrap(),
51
+ .unwrap_or_else(identity),
52
)
53
}
54
0 commit comments