mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-10 05:29:08 +08:00
refactor(core): standardize frontend error handling (#10667)
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
"dependencies": {
|
||||
"@affine/debug": "workspace:*",
|
||||
"@affine/electron-api": "workspace:*",
|
||||
"@affine/error": "workspace:*",
|
||||
"@affine/graphql": "workspace:*",
|
||||
"@affine/i18n": "workspace:*",
|
||||
"@atlaskit/pragmatic-drag-and-drop": "^1.4.0",
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
import { AuthPageContainer } from '@affine/component/auth-components';
|
||||
import {
|
||||
ErrorNames,
|
||||
type GetInviteInfoQuery,
|
||||
UserFriendlyError,
|
||||
} from '@affine/graphql';
|
||||
import { UserFriendlyError } from '@affine/error';
|
||||
import { ErrorNames, type GetInviteInfoQuery } from '@affine/graphql';
|
||||
import { Trans, useI18n } from '@affine/i18n';
|
||||
|
||||
import { Avatar } from '../../ui/avatar';
|
||||
@@ -16,7 +13,7 @@ export const JoinFailedPage = ({
|
||||
inviteInfo: GetInviteInfoQuery['getInviteInfo'];
|
||||
error?: any;
|
||||
}) => {
|
||||
const userFriendlyError = UserFriendlyError.fromAnyError(error);
|
||||
const userFriendlyError = UserFriendlyError.fromAny(error);
|
||||
const t = useI18n();
|
||||
return (
|
||||
<AuthPageContainer
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
"references": [
|
||||
{ "path": "../../common/debug" },
|
||||
{ "path": "../electron-api" },
|
||||
{ "path": "../../common/error" },
|
||||
{ "path": "../graphql" },
|
||||
{ "path": "../i18n" },
|
||||
{ "path": "../../../tools/utils" },
|
||||
|
||||
Reference in New Issue
Block a user