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 e88d8fc commit add09b9Copy full SHA for add09b9
src/error.rs
@@ -112,6 +112,12 @@ impl Error {
112
None
113
}
114
115
+ /// Returns the inner [`anyhow::Error`]
116
+ /// Note: This will lose status code information
117
+ pub fn into_inner(self) -> anyhow::Error {
118
+ self.error
119
+ }
120
+
121
/// Attempt to downcast the error object to a concrete type.
122
pub fn downcast<E>(self) -> std::result::Result<E, Self>
123
where
@@ -163,7 +169,6 @@ impl<E: Into<anyhow::Error>> From<E> for Error {
163
169
Self::new(StatusCode::InternalServerError, error)
164
170
165
171
166
-
167
172
impl AsRef<dyn StdError + Send + Sync> for Error {
168
173
fn as_ref(&self) -> &(dyn StdError + Send + Sync + 'static) {
174
self.error.as_ref()
0 commit comments