mirror of
https://github.com/QingWei-Li/notea.git
synced 2024-11-26 00:09:59 +03:00
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:
parent
e438224dd0
commit
8e93bd51da
@ -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";
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user