mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 01:56:27 +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:
@@ -5,7 +5,8 @@ export type ErrorName =
|
||||
| keyof typeof ErrorNames
|
||||
| 'NETWORK_ERROR'
|
||||
| 'CONTENT_TOO_LARGE'
|
||||
| 'REQUEST_ABORTED';
|
||||
| 'REQUEST_ABORTED'
|
||||
| 'UNSUPPORTED_SERVER_VERSION';
|
||||
|
||||
export interface UserFriendlyErrorResponse {
|
||||
status: number;
|
||||
|
||||
Reference in New Issue
Block a user