mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 13:25:12 +00:00
fix: handle gql error correctly (#7507)
This commit is contained in:
@@ -26,7 +26,12 @@ export class UserFriendlyError implements UserFriendlyErrorResponse {
|
||||
return new UserFriendlyError(response.extensions);
|
||||
}
|
||||
|
||||
if (typeof response === 'object' && response.type && response.name) {
|
||||
if (
|
||||
response &&
|
||||
typeof response === 'object' &&
|
||||
response.type &&
|
||||
response.name
|
||||
) {
|
||||
return new UserFriendlyError(response);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user