guardian / grid

The Guardian’s image management system
https://www.theguardian.com/info/developer-blog/2015/aug/12/open-sourcing-grid-image-service
Apache License 2.0
1.44k stars 120 forks source link

No error logging for unsupported file type #4234

Open dblatcher opened 9 months ago

dblatcher commented 9 months ago

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:

## 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?

github-actions[bot] commented 9 months ago

Deploy build 12259 to TEST

All deployment options - [Deploy build 12259 to TEST](https://riffraff.gutools.co.uk/deployment/deployAgain?project=media-service%3A%3Agrid%3A%3Aall&build=12259&stage=TEST&updateStrategy=MostlyHarmless&action=deploy) - [Deploy parts of build 12259 to TEST by previewing it first](https://riffraff.gutools.co.uk/preview/yaml?project=media-service%3A%3Agrid%3A%3Aall&build=12259&stage=TEST&updateStrategy=MostlyHarmless)

From guardian/actions-riff-raff.