@@ -189,7 +189,7 @@ impl MithrilCertifierService {
189
189
. open_message_repository
190
190
. get_open_message_with_single_signatures ( signed_entity_type)
191
191
. await
192
- . with_context ( || "Can not get open message with single signatures" ) ?;
192
+ . with_context ( || "Certifier can not get open message with single signatures for signed entity type: '{signed_entity_type}' " ) ?;
193
193
194
194
Ok ( open_message_with_single_signatures)
195
195
}
@@ -199,7 +199,11 @@ impl MithrilCertifierService {
199
199
impl CertifierService for MithrilCertifierService {
200
200
async fn inform_epoch ( & self , epoch : Epoch ) -> StdResult < ( ) > {
201
201
debug ! ( "CertifierService::inform_epoch(epoch: {epoch:?})" ) ;
202
- let nb = self . open_message_repository . clean_epoch ( epoch) . await ?;
202
+ let nb = self
203
+ . open_message_repository
204
+ . clean_epoch ( epoch)
205
+ . await
206
+ . with_context ( || "Certifier can not clean open messages from epoch '{epoch}'" ) ?;
203
207
info ! ( "MithrilCertifierService: Informed of a new Epoch: {epoch:?}. Cleaned {nb} open messages along with their single signatures." ) ;
204
208
205
209
Ok ( ( ) )
@@ -258,7 +262,7 @@ impl CertifierService for MithrilCertifierService {
258
262
. await
259
263
. with_context ( || {
260
264
format ! (
261
- "Can not create open message from protocol_message: '{:?}, epoch: '{}''" ,
265
+ "Certifier can not create open message from protocol_message: '{:?}, epoch: '{}''" ,
262
266
protocol_message,
263
267
signed_entity_type. get_epoch( )
264
268
)
@@ -282,7 +286,7 @@ impl CertifierService for MithrilCertifierService {
282
286
. open_message_repository
283
287
. get_open_message_with_single_signatures ( signed_entity_type)
284
288
. await
285
- . with_context ( || "Can not get open message with single signatures" ) ?
289
+ . with_context ( || "Certifier can not get open message with single signatures for signed entity type: '{signed_entity_type}' " ) ?
286
290
. map ( |record| record. into ( ) ) ;
287
291
288
292
Ok ( open_message)
@@ -388,7 +392,9 @@ impl CertifierService for MithrilCertifierService {
388
392
open_message_certified. is_certified = true ;
389
393
self . open_message_repository
390
394
. update_open_message ( & open_message_certified)
391
- . await ?;
395
+ . await
396
+ . with_context ( || "Certifier can not update open message for signed entity type: '{signed_entity_type}'" )
397
+ ?;
392
398
393
399
Ok ( Some ( certificate) )
394
400
}
0 commit comments