mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-22 04:21:40 +08:00
fix(core): handle unsupported server error (#15164)
fix #15160 fix #15161 fix #15158 fix #15166 #### PR Dependency Tree * **PR #15164** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a “server version too old” message for self-hosted servers, including the required upgrade version. * Sign-in and OAuth-related preflight steps now verify server compatibility before proceeding. * **Bug Fixes** * Improved error handling for missing/invalid server version responses and schema/type mismatches, mapping them to the upgrade instruction. * **Tests** * Added coverage for server version guarding and the resulting user-friendly error payload. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
"en": 100,
|
||||
"es-AR": 93,
|
||||
"es-CL": 94,
|
||||
"es": 93,
|
||||
"es": 92,
|
||||
"fa": 92,
|
||||
"fr": 97,
|
||||
"fr": 96,
|
||||
"hi": 1,
|
||||
"it": 94,
|
||||
"ja": 92,
|
||||
|
||||
@@ -9692,6 +9692,12 @@ export function useAFFiNEI18N(): {
|
||||
clientVersion: string;
|
||||
requiredVersion: string;
|
||||
}>): string;
|
||||
/**
|
||||
* `This AFFiNE server is too old for this client. Please upgrade the server to {{requiredVersion}}.`
|
||||
*/
|
||||
["error.UNSUPPORTED_SERVER_VERSION"](options: {
|
||||
readonly requiredVersion: string;
|
||||
}): string;
|
||||
/**
|
||||
* `Notification not found.`
|
||||
*/
|
||||
|
||||
@@ -2393,6 +2393,7 @@
|
||||
"error.INVALID_LICENSE_UPDATE_PARAMS": "Invalid license update params. {{reason}}",
|
||||
"error.LICENSE_EXPIRED": "License has expired.",
|
||||
"error.UNSUPPORTED_CLIENT_VERSION": "Unsupported client with version [{{clientVersion}}], required version is [{{requiredVersion}}].",
|
||||
"error.UNSUPPORTED_SERVER_VERSION": "This AFFiNE server is too old for this client. Please upgrade the server to {{requiredVersion}}.",
|
||||
"error.NOTIFICATION_NOT_FOUND": "Notification not found.",
|
||||
"error.MENTION_USER_DOC_ACCESS_DENIED": "Mentioned user can not access doc {{docId}}.",
|
||||
"error.MENTION_USER_ONESELF_DENIED": "You can not mention yourself.",
|
||||
|
||||
@@ -2393,6 +2393,7 @@
|
||||
"error.INVALID_LICENSE_UPDATE_PARAMS": "无效的许可证更新参数。{{reason}}",
|
||||
"error.LICENSE_EXPIRED": "许可证已过期。",
|
||||
"error.UNSUPPORTED_CLIENT_VERSION": "不支持的客户端版本 [{{clientVersion}}],所需版本为 [{{requiredVersion}}]。",
|
||||
"error.UNSUPPORTED_SERVER_VERSION": "此 AFFiNE 服务器版本过旧,当前客户端需要连接 {{requiredVersion}} 的服务器。请升级服务器后重试。",
|
||||
"error.NOTIFICATION_NOT_FOUND": "未找到通知。",
|
||||
"error.MENTION_USER_DOC_ACCESS_DENIED": "提到的用户无法访问文档 {{docId}}。",
|
||||
"error.MENTION_USER_ONESELF_DENIED": "你不能提及你自己。",
|
||||
|
||||
Reference in New Issue
Block a user