chore: minor error handling improvements (#325)

* Minor error handling improvements

* Fix error
This commit is contained in:
Ahmad Afuni 2025-07-05 20:06:44 +10:00 committed by GitHub
parent 901ba6442c
commit 2c41a6c554
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 62 additions and 58 deletions

View file

@ -312,12 +312,11 @@ impl Pod for MockMainPod {
.deref(
&self.statements[..input_statement_offset + i],
&self.merkle_proofs_containers,
)
.unwrap()
.check_and_log(&self.params, &s.clone().try_into().unwrap())
)?
.check_and_log(&self.params, &s.clone().try_into()?)
.map_err(|e| e.into())
})
.collect::<Result<Vec<_>, middleware::Error>>()
.unwrap();
.collect::<Result<Vec<_>>>()?;
if !statement_check.iter().all(|b| *b) {
return Err(Error::statement_not_check());
}