fix(server): handle s3 notfound error (#11386)

This commit is contained in:
darkskygit
2025-04-02 04:20:05 +00:00
parent f091ac7e74
commit add4a5859d

View File

@@ -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;
}