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