uchicago-library / attachment-converter

Attachment Converter: tool for batch converting attachments in an email mailbox
GNU General Public License v2.0
8 stars 3 forks source link

17 update acopy and amap #30

Closed cormacd9818 closed 2 years ago

cormacd9818 commented 2 years ago

The FatalError and LogError types will eventually include additional values. The plan for right now is that all errors pertaining to individual attachments (ie. improperly formatted headers, MBOX issues, etc.) will be errors that we write to a log or to stdout and continue execution. Both 'acopy' and 'amap', for instance, will continue converting the remaining attachments if there is an exception in getting the 'content-type' from an attachment header. All errors related to configuration will be fatal in that they halt execution and return the error type. For right now, if a source type cannot be found, 'acopy' and 'amap' will return a fatal error--this might be better as log error as well, but for right now it's probably a good idea to shut everything down in case there are multiple attachments of this particular source type.