Google Drive: Uppy makes 10 upload retries for malicious files

We use self-hosted companion (v5.1.4) to handle uploads via Google Drive.

When Google Drive has a malicious file, the uppy client keeps trying to upload it to AWS even when Google returns ‘HTTP 403: This file has been identified as malware or spam and cannot be downloaded.’

Retries take up to 20 minutes due to the exponential backoff strategy of retries.

Could you please advise me on how to resolve this issue? In my opinion, Google error should be treated as immediately shown to users (no retries if we know the file is malicious). Any other thoughts on how to fix long retries for google drive malicious files?

We use uppy client libs of the following versions:
@uppy/aws-s3”: “3.6.2”,
@uppy/core”: “3.13.1”,
@uppy/dashboard”: “3.9.1”,
@uppy/drag-drop”: “3.1.1”,
@uppy/dropbox”: “3.4.0”,
@uppy/file-input”: “3.1.2”,
@uppy/google-drive”: “3.6.0”,
@uppy/onedrive”: “3.4.0”,
@uppy/progress-bar”: “3.1.1”,
@uppy/react”: “3.4.0”,
@uppy/status-bar”: “3.3.3”.