mirror of
https://github.com/matrix-org/synapse-s3-storage-provider.git
synced 2024-10-23 07:29:40 +00:00
Correctly catch 404 errors
The docs are super unclear on how one should catch a missing file exception, but empirically this should catch the errors we're seeing.
This commit is contained in:
parent
86f5f6390f
commit
4a1356c0b2
1 changed files with 1 additions and 1 deletions
|
@ -118,7 +118,7 @@ class _S3DownloadThread(threading.Thread):
|
|||
try:
|
||||
resp = s3.get_object(Bucket=self.bucket, Key=self.key)
|
||||
except botocore.exceptions.ClientError as e:
|
||||
if e.response['Error']['Code'] == "404":
|
||||
if e.response['Error']['Code'] in ("404", "NoSuchKey",):
|
||||
reactor.callFromThread(self.deferred.callback, None)
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in a new issue