From 01d97521a4a15c188599631ba452b17fc4232657 Mon Sep 17 00:00:00 2001 From: K <1175047471@qq.com> Date: Tue, 9 Apr 2024 18:37:19 +0800 Subject: [PATCH] chore: fix axios error message --- src/utils/http/axios/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/http/axios/index.ts b/src/utils/http/axios/index.ts index e580e91b..ad4de315 100644 --- a/src/utils/http/axios/index.ts +++ b/src/utils/http/axios/index.ts @@ -229,7 +229,7 @@ const transform: AxiosTransform = { errorLogStore.addAjaxErrorInfo(error) const { response, code, message, config } = error || {} const errorMessageMode = config?.requestOptions?.errorMessageMode || 'none' - const msg: string = response?.data?.error?.message ?? '' + const msg: string = response?.data?.msg ?? '' const err: string = error?.toString?.() ?? '' let errMessage = ''