Skip to content

Commit fba41fc

Browse files
committed
Merge branch 'errors-with-sources' into mongo-embedded-testing
2 parents e722799 + 0d855cb commit fba41fc

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

nativelink-error/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ impl From<serde_json5::Error> for Error {
220220
msg
221221
)
222222
} else {
223-
make_err!(Code::Internal, "{}", msg)
223+
Self::new(Code::Internal, msg)
224224
}
225225
}
226226
}
@@ -295,7 +295,7 @@ impl From<redis::RedisError> for Error {
295295

296296
impl From<tonic::Status> for Error {
297297
fn from(status: tonic::Status) -> Self {
298-
make_err!(status.code(), "{}", status.to_string())
298+
Self::new(status.code(), status.to_string())
299299
}
300300
}
301301

@@ -331,7 +331,7 @@ impl From<tokio::time::error::Elapsed> for Error {
331331

332332
impl From<url::ParseError> for Error {
333333
fn from(err: url::ParseError) -> Self {
334-
Self::from_std_err(Code::DeadlineExceeded, &err)
334+
Self::from_std_err(Code::Internal, &err)
335335
}
336336
}
337337

nativelink-error/tests/error_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn walkdir_source_error() {
1919
err.messages,
2020
vec![
2121
os_error,
22-
"IO error for operation on /bad/path: No such file or directory (os error 2)"
22+
&format!("IO error for operation on /bad/path: {os_error}")
2323
]
2424
);
2525
}

0 commit comments

Comments
 (0)