File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 3636}
3737
3838# The size in bytes of an empty batch file containing only the headers row
39- EMPTY_BATCH_FILE_SIZE_IN_BYTES = 615
39+ EMPTY_BATCH_FILE_SIZE_IN_BYTES = 700
4040
4141
4242class FileStatus (StrEnum ):
Original file line number Diff line number Diff line change @@ -114,7 +114,11 @@ def handle_record(record) -> dict:
114114 UnhandledSqsError ,
115115 Exception ,
116116 ) as error :
117- logger .error ("Error processing file '%s': %s" , file_key , str (error ))
117+ if isinstance (error , EmptyFileError ):
118+ # Avoid error log noise for accepted scenario in which supplier provides a batch file with no records
119+ logger .warning ("Error processing file '%s': %s" , file_key , str (error ))
120+ else :
121+ logger .error ("Error processing file '%s': %s" , file_key , str (error ))
118122
119123 file_status = FileStatus .PROCESSED
120124 if isinstance (error , DuplicateFileError ):
You can’t perform that action at this time.
0 commit comments