fix: error body message -> error (#88)

This commit is contained in:
RustamRu
2025-02-22 18:56:20 +03:00
committed by ilnaz
parent d312445bf2
commit 91fc91230b
4 changed files with 6 additions and 6 deletions

View File

@@ -13,9 +13,9 @@ export const extractErrorMessageFromResponse = ({
}: FetchBaseQueryError) => {
if (
typeof data === 'object' &&
'message' in data &&
typeof data.message === 'string'
'error' in data &&
typeof data.error === 'string'
) {
return data.message;
return data.error;
}
};