Skip to content

Commit b9cfe2d

Browse files
committed
validator_worker - sentry_interface - add error context
1 parent 2b9d478 commit b9cfe2d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

validator_worker/src/sentry_interface.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use primitives::sentry::{
1111
use primitives::validator::MessageTypes;
1212
use primitives::{Channel, Config, ValidatorDesc, ValidatorId};
1313
use reqwest::{Client, Response};
14-
use slog::Logger;
14+
use slog::{error, Logger};
1515
use std::collections::HashMap;
1616
use std::time::Duration;
1717

@@ -53,7 +53,7 @@ impl<T: Adapter + 'static> SentryApi<T> {
5353
.map(|auth| (validator.to_owned(), auth))
5454
.map_err(|e| {
5555
ValidatorWorker::Failed(format!(
56-
"propagate error: get auth failed {}",
56+
"Propagation error: get auth failed {}",
5757
e
5858
))
5959
})
@@ -71,7 +71,7 @@ impl<T: Adapter + 'static> SentryApi<T> {
7171
})
7272
}
7373
SpecValidator::None => Err(ValidatorWorker::Failed(
74-
"we can not find validator entry for whoami".to_string(),
74+
"We can not find validator entry for whoami".to_string(),
7575
)),
7676
}
7777
}
@@ -83,7 +83,7 @@ impl<T: Adapter + 'static> SentryApi<T> {
8383
}))
8484
.await
8585
{
86-
println!("Propagation error: {}", e);
86+
error!(&self.logger, "Propagation error: {}", e; "module" => "sentry_interface", "in" => "SentryApi");
8787
}
8888
}
8989

0 commit comments

Comments
 (0)