mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-16 13:57:02 +08:00
feat(nbstore): blob storage adapt to new error type (#11005)
This commit is contained in:
@@ -79,9 +79,12 @@ export class CloudBlobStorage extends BlobStorageBase {
|
||||
});
|
||||
} catch (err) {
|
||||
const userFriendlyError = UserFriendlyError.fromAny(err);
|
||||
if (userFriendlyError.is('BLOB_QUOTA_EXCEEDED')) {
|
||||
if (userFriendlyError.is('STORAGE_QUOTA_EXCEEDED')) {
|
||||
throw new OverCapacityError();
|
||||
}
|
||||
if (userFriendlyError.is('BLOB_QUOTA_EXCEEDED')) {
|
||||
throw new OverSizeError();
|
||||
}
|
||||
if (userFriendlyError.is('CONTENT_TOO_LARGE')) {
|
||||
throw new OverSizeError();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user