grid
grid copied to clipboard
No error logging for unsupported file type
What does this change?
Refactors the updateUploadStatusTable to throw the exception to the upload operation (where the upload failed)
The recover on attemptToProcessIngestedFile has a separate case block for UnsupportedMimeType exceptions so that:
- the failure to process the file for this reason will be logged as info rather than an error
- increments a metric with the uploader and and mimetype
How should a reviewer test this change?
Upload a non-image file and check the logs for a "File has unsupported mime type" entry.
How can success be measured?
Less errors in the logs. Able to see which unsupported file types are often uploaded and by whom
Who should look at this?
Tested? Documented?
- [x] locally by committer
- [ ] locally by Guardian reviewer
- [ ] on the Guardian's TEST environment
- [ ] relevant documentation added or amended (if needed)