Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
lixueping committed Mar 28, 2024
1 parent a795a04 commit 6cc8d98
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/web/src/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ async function axiosPromiseWrapper(p: Promise<any>) {
return await p
} catch (e) {
if (isAxiosError(e)) {
if (e.response?.data?.error) {
const { error, error_description } = e.response.data
if ((e.response?.data as any)?.error) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const { error, error_description } = e.response!.data as any
throw new Error(`认证服务器返回错误 ${error}: ${error_description}`)
}
}
Expand Down

0 comments on commit 6cc8d98

Please sign in to comment.