Improve error handling in approval voting block import (#5283)

* Print out original the runtime API error

* Improved error handling in approval voting block import

* Fix test

* Update comment
This commit is contained in:
Koute
2022-04-08 17:26:38 +09:00
committed by GitHub
parent ecd42d5408
commit ef4e64c641
4 changed files with 57 additions and 30 deletions
+2 -2
View File
@@ -21,8 +21,8 @@ use crate::JaegerError;
/// A description of an error causing the runtime API request to be unservable.
#[derive(thiserror::Error, Debug, Clone)]
pub enum RuntimeApiError {
/// The runtime API cannot be executed due to a
#[error("The runtime API '{runtime_api_name}' cannot be executed")]
/// The runtime API cannot be executed due to a runtime error.
#[error("The runtime API '{runtime_api_name}' cannot be executed: {source}")]
Execution {
/// The runtime API being called
runtime_api_name: &'static str,