Skip to content

Commit e722799

Browse files
committed
Use new error source handling
1 parent 9f7bda2 commit e722799

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

nativelink-error/src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -336,20 +336,20 @@ impl From<url::ParseError> for Error {
336336
}
337337

338338
impl From<mongodb::error::Error> for Error {
339-
fn from(value: mongodb::error::Error) -> Self {
340-
Self::new(Code::Internal, value.to_string())
339+
fn from(err: mongodb::error::Error) -> Self {
340+
Self::from_std_err(Code::Internal, &err)
341341
}
342342
}
343343

344344
impl From<reqwest::Error> for Error {
345-
fn from(value: reqwest::Error) -> Self {
346-
Self::new(Code::Internal, value.to_string())
345+
fn from(err: reqwest::Error) -> Self {
346+
Self::from_std_err(Code::Internal, &err)
347347
}
348348
}
349349

350350
impl From<zip::result::ZipError> for Error {
351-
fn from(value: zip::result::ZipError) -> Self {
352-
Self::new(Code::Internal, value.to_string())
351+
fn from(err: zip::result::ZipError) -> Self {
352+
Self::from_std_err(Code::Internal, &err)
353353
}
354354
}
355355

0 commit comments

Comments
 (0)