@@ -263,15 +263,43 @@ where
263263 failure_msg,
264264 } ;
265265
266- coordinator_client. submit_proof ( & submit_proof_req) . await ?;
267- info ! (
268- prover_name = ?coordinator_client. prover_name,
269- ?coordinator_task. task_type,
270- ?coordinator_task. uuid,
271- ?coordinator_task. task_id,
272- ?task. task_id,
273- "Proof submitted"
274- ) ;
266+ let submit_proof_result = match coordinator_client. submit_proof ( & submit_proof_req) . await {
267+ Ok ( result) => result,
268+ Err ( e) => {
269+ info ! (
270+ prover_name = ?coordinator_client. prover_name,
271+ ?coordinator_task. task_type,
272+ ?coordinator_task. uuid,
273+ ?coordinator_task. task_id,
274+ ?task. task_id,
275+ error = ?e,
276+ "Failed to submit proof due to a http error"
277+ ) ;
278+ return Ok ( ( ) )
279+ }
280+ } ;
281+
282+ if submit_proof_result. errcode != ErrorCode :: Success {
283+ info ! (
284+ prover_name = ?coordinator_client. prover_name,
285+ ?coordinator_task. task_type,
286+ ?coordinator_task. uuid,
287+ ?coordinator_task. task_id,
288+ ?task. task_id,
289+ errcode = ?submit_proof_result. errcode,
290+ errmsg = ?submit_proof_result. errmsg,
291+ "Failed to submit proof due to coordinator error"
292+ ) ;
293+ } else {
294+ info ! (
295+ prover_name = ?coordinator_client. prover_name,
296+ ?coordinator_task. task_type,
297+ ?coordinator_task. uuid,
298+ ?coordinator_task. task_id,
299+ ?task. task_id,
300+ "Proof submitted successfully"
301+ ) ;
302+ }
275303 Ok ( ( ) )
276304 }
277305
0 commit comments