Skip to content
Snippets Groups Projects
Commit bbd95707 authored by Nicolas80's avatar Nicolas80
Browse files

Added extra message when the DB parsing of DbAccountId fails, so we know for...

Added extra message when the DB parsing of DbAccountId fails, so we know for which string it failed.
parent 0da71079
No related branches found
No related tags found
1 merge request!44feat: Can choose between ed25519 ans sr25519
Pipeline #40184 passed
...@@ -134,7 +134,10 @@ impl sea_orm::TryGetable for DbAccountId { ...@@ -134,7 +134,10 @@ impl sea_orm::TryGetable for DbAccountId {
.try_get_by(idx) .try_get_by(idx)
.map_err(|e| TryGetError::Null(e.to_string()))?; .map_err(|e| TryGetError::Null(e.to_string()))?;
Ok(DbAccountId(AccountId::from_str(&value).map_err(|e| { Ok(DbAccountId(AccountId::from_str(&value).map_err(|e| {
TryGetError::DbErr(DbErr::Custom(e.to_string())) TryGetError::DbErr(DbErr::Custom(format!(
"Cannot parse DbAccountId for string '{}' - error: {}",
&value, e
)))
})?)) })?))
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment