@@ -244,8 +244,7 @@ def audit_received_file_step(
244244 )
245245 continue
246246 except Exception as exc : # pylint: disable=W0703
247- self ._logger .error (f"audit_received_file raised exception: { exc } " )
248- self ._logger .exception (exc )
247+ self ._logger .exception ("audit_received_file raised exception:" )
249248 dump_processing_errors (
250249 fh .joinuri (self .processed_files_path , submission_id ),
251250 "audit_received" ,
@@ -301,8 +300,7 @@ def file_transformation(
301300 )
302301
303302 except MessageBearingError as exc :
304- self ._logger .error (f"Unexpected file transformation error: { exc } " )
305- self ._logger .exception (exc )
303+ self ._logger .exception ("Unexpected file transformation error:" )
306304 errors .extend (exc .messages )
307305
308306 if errors :
@@ -352,8 +350,7 @@ def file_transformation_step(
352350 )
353351 continue
354352 except Exception as exc : # pylint: disable=W0703
355- self ._logger .error (f"File transformation raised exception: { exc } " )
356- self ._logger .exception (exc )
353+ self ._logger .exception ("File transformation raised exception:" )
357354 dump_processing_errors (
358355 fh .joinuri (self .processed_files_path , sub_info .submission_id ),
359356 "file_transformation" ,
@@ -478,8 +475,7 @@ def data_contract_step(
478475 )
479476 continue
480477 except Exception as exc : # pylint: disable=W0703
481- self ._logger .error (f"Data Contract raised exception: { exc } " )
482- self ._logger .exception (exc )
478+ self ._logger .exception ("Data Contract raised exception:" )
483479 dump_processing_errors (
484480 fh .joinuri (self .processed_files_path , sub_info .submission_id ),
485481 "contract" ,
@@ -644,8 +640,7 @@ def business_rule_step(
644640 )
645641 continue
646642 except Exception as exc : # pylint: disable=W0703
647- self ._logger .error (f"Business Rules raised exception: { exc } " )
648- self ._logger .exception (exc )
643+ self ._logger .exception ("Business Rules raised exception:" )
649644 dump_processing_errors (
650645 fh .joinuri (self .processed_files_path , sub_info .submission_id ),
651646 "business_rules" ,
@@ -704,9 +699,8 @@ def _get_error_dataframes(self, submission_id: str):
704699 errors = None
705700 try :
706701 errors = json .load (f )
707- except UnicodeDecodeError as exc :
708- self ._logger .error (f"Error reading file: { file } " )
709- self ._logger .exception (exc )
702+ except UnicodeDecodeError :
703+ self ._logger .exception (f"Error reading file: { file } " )
710704 continue
711705 if not errors :
712706 continue
@@ -845,8 +839,7 @@ def error_report_step(
845839 )
846840 continue
847841 except Exception as exc : # pylint: disable=W0703
848- self ._logger .error (f"Error reports raised exception: { exc } " )
849- self ._logger .exception (exc )
842+ self ._logger .exception ("Error reports raised exception:" )
850843 dump_processing_errors (
851844 fh .joinuri (self .processed_files_path , sub_info .submission_id ),
852845 "error_report" ,
0 commit comments