mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
refactor(core): standardize frontend error handling (#10667)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user