Skip to content

Commit fc8e1bb

Browse files
committed
fix: display error that does not implement std::error:Error
1 parent 427266f commit fc8e1bb

File tree

1 file changed

+5
-2
lines changed
  • cvmassistants/quote-generator/src

1 file changed

+5
-2
lines changed

cvmassistants/quote-generator/src/main.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*
3030
*/
3131

32-
use log::{debug, info};
32+
use log::{debug, error, info};
3333
use std::env;
3434
use std::fs;
3535
mod error;
@@ -121,7 +121,10 @@ fn create_quote(report_data: &tdx_attest_rs::tdx_report_data_t) -> Result<Vec<u8
121121
None => Err(QuoteGeneratorError::TdxQuoteEmpty),
122122
}
123123
},
124-
_ => Err(QuoteGeneratorError::TdxQuoteFailed),
124+
_ => {
125+
error!("Failed to get TDX quote: {:?}", result);
126+
Err(QuoteGeneratorError::TdxQuoteFailed) // _tdx_attest_error_t does not implement std::error::Error
127+
}
125128
}
126129
}
127130

0 commit comments

Comments
 (0)