fix(server): handle s3 notfound error (#11386)
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
|||||||
HeadObjectCommand,
|
HeadObjectCommand,
|
||||||
ListObjectsV2Command,
|
ListObjectsV2Command,
|
||||||
NoSuchKey,
|
NoSuchKey,
|
||||||
|
NotFound,
|
||||||
PutObjectCommand,
|
PutObjectCommand,
|
||||||
S3Client,
|
S3Client,
|
||||||
S3ClientConfig,
|
S3ClientConfig,
|
||||||
@@ -98,7 +99,7 @@ export class S3StorageProvider implements StorageProvider {
|
|||||||
};
|
};
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// 404
|
// 404
|
||||||
if (e instanceof NoSuchKey) {
|
if (e instanceof NoSuchKey || e instanceof NotFound) {
|
||||||
this.logger.verbose(`Object \`${key}\` not found`);
|
this.logger.verbose(`Object \`${key}\` not found`);
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user