refactor(server): use feature model (#9932)

This commit is contained in:
forehalo
2025-02-05 10:27:26 +00:00
parent 0ff8d3af6f
commit 7826e2b7c8
121 changed files with 1723 additions and 3826 deletions

View File

@@ -478,6 +478,10 @@ export const USER_FRIENDLY_ERRORS = {
type: 'internal_server_error',
message: 'Failed to store doc snapshot.',
},
action_forbidden_on_non_team_workspace: {
type: 'action_forbidden',
message: 'A Team workspace is required to perform this action.',
},
// Subscription Errors
unsupported_subscription_plan: {

View File

@@ -399,6 +399,12 @@ export class FailedToUpsertSnapshot extends UserFriendlyError {
super('internal_server_error', 'failed_to_upsert_snapshot', message);
}
}
export class ActionForbiddenOnNonTeamWorkspace extends UserFriendlyError {
constructor(message?: string) {
super('action_forbidden', 'action_forbidden_on_non_team_workspace', message);
}
}
@ObjectType()
class UnsupportedSubscriptionPlanDataType {
@Field() plan!: string
@@ -754,6 +760,7 @@ export enum ErrorNames {
PAGE_IS_NOT_PUBLIC,
FAILED_TO_SAVE_UPDATES,
FAILED_TO_UPSERT_SNAPSHOT,
ACTION_FORBIDDEN_ON_NON_TEAM_WORKSPACE,
UNSUPPORTED_SUBSCRIPTION_PLAN,
FAILED_TO_CHECKOUT,
INVALID_CHECKOUT_PARAMETERS,