Add some better logging for get_outputs_by_id failure states (#2705)
This commit is contained in:
+3
-2
@@ -203,8 +203,9 @@ fn send_request_async(req: Request<Body>) -> Box<dyn Future<Item = String, Error
|
||||
.and_then(|resp| {
|
||||
if !resp.status().is_success() {
|
||||
Either::A(err(ErrorKind::RequestError(format!(
|
||||
"Wrong response code: {}",
|
||||
resp.status()
|
||||
"Wrong response code: {} with data {:?}",
|
||||
resp.status(),
|
||||
resp.body()
|
||||
))
|
||||
.into()))
|
||||
} else {
|
||||
|
||||
@@ -106,9 +106,13 @@ impl OutputHandler {
|
||||
|
||||
let mut outputs: Vec<Output> = vec![];
|
||||
for x in commitments {
|
||||
if let Ok(output) = self.get_output(&x) {
|
||||
outputs.push(output);
|
||||
}
|
||||
match self.get_output(&x) {
|
||||
Ok(output) => outputs.push(output),
|
||||
Err(e) => error!(
|
||||
"Failure to get output for commitment {} with error {}",
|
||||
x, e
|
||||
),
|
||||
};
|
||||
}
|
||||
Ok(outputs)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user