feat(server): client version check (#9205)

Co-authored-by: forehalo <forehalo@gmail.com>
This commit is contained in:
DarkSky
2025-02-20 15:50:22 +08:00
committed by GitHub
parent 4fee2a9c4b
commit fa86f71853
17 changed files with 369 additions and 10 deletions

View File

@@ -724,4 +724,15 @@ export const USER_FRIENDLY_ERRORS = {
message: ({ limit }) =>
`You cannot downgrade the workspace from team workspace because there are more than ${limit} members that are currently active.`,
},
// version errors
unsupported_client_version: {
type: 'action_forbidden',
args: {
clientVersion: 'string',
requiredVersion: 'string',
},
message: ({ clientVersion, requiredVersion }) =>
`Unsupported client with version [${clientVersion}], required version is [${requiredVersion}].`,
},
} satisfies Record<string, UserFriendlyErrorOptions>;