change: Check for err.name === "NoSuchKey" in S3 store

NoSuchKey: I've observed errors to have the type property named `name` instead of `code` or `message`. See #144.
This commit is contained in:
tecc 2022-09-17 18:29:44 +02:00
parent e438224dd0
commit 8e93bd51da
No known key found for this signature in database
GPG Key ID: 400AAD881FCC028B

View File

@ -15,7 +15,7 @@ import { isEmpty, toNumber } from 'lodash';
import { Client as MinioClient } from 'minio';
function isNoSuchKey(err: any) {
return err.code === 'NoSuchKey' || err.message === 'NoSuchKey';
return err.code === 'NoSuchKey' || err.message === 'NoSuchKey' || err.name === "NoSuchKey";
}
/**