mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
feat(server): separate storage quota limit and blob size limit (#10957)
close CLOUD-171
This commit is contained in:
@@ -695,7 +695,11 @@ export const USER_FRIENDLY_ERRORS = {
|
||||
// Quota & Limit errors
|
||||
blob_quota_exceeded: {
|
||||
type: 'quota_exceeded',
|
||||
message: 'You have exceeded your blob storage quota.',
|
||||
message: 'You have exceeded your blob size quota.',
|
||||
},
|
||||
storage_quota_exceeded: {
|
||||
type: 'quota_exceeded',
|
||||
message: 'You have exceeded your storage quota.',
|
||||
},
|
||||
member_quota_exceeded: {
|
||||
type: 'quota_exceeded',
|
||||
|
||||
@@ -759,6 +759,12 @@ export class BlobQuotaExceeded extends UserFriendlyError {
|
||||
}
|
||||
}
|
||||
|
||||
export class StorageQuotaExceeded extends UserFriendlyError {
|
||||
constructor(message?: string) {
|
||||
super('quota_exceeded', 'storage_quota_exceeded', message);
|
||||
}
|
||||
}
|
||||
|
||||
export class MemberQuotaExceeded extends UserFriendlyError {
|
||||
constructor(message?: string) {
|
||||
super('quota_exceeded', 'member_quota_exceeded', message);
|
||||
@@ -995,6 +1001,7 @@ export enum ErrorNames {
|
||||
COPILOT_FAILED_TO_MATCH_CONTEXT,
|
||||
COPILOT_EMBEDDING_UNAVAILABLE,
|
||||
BLOB_QUOTA_EXCEEDED,
|
||||
STORAGE_QUOTA_EXCEEDED,
|
||||
MEMBER_QUOTA_EXCEEDED,
|
||||
COPILOT_QUOTA_EXCEEDED,
|
||||
RUNTIME_CONFIG_NOT_FOUND,
|
||||
|
||||
Reference in New Issue
Block a user