Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No error logging for unsupported file type #4234

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

dblatcher
Copy link
Contributor

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?

  • locally by committer
  • locally by Guardian reviewer
  • on the Guardian's TEST environment
  • relevant documentation added or amended (if needed)

@dblatcher dblatcher requested a review from a team as a code owner January 5, 2024 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant