Browse Source

chore(deps): update axios error type

Pouria Ezzati 3 years ago
parent
commit
f7c6df2f51
1 changed files with 1 additions and 1 deletions
  1. 1 1
      client/utils.ts

+ 1 - 1
client/utils.ts

@@ -18,6 +18,6 @@ export const getAxiosConfig = (
 });
 
 export const errorMessage = (err: AxiosError, defaultMessage?: string) => {
-  const data = err?.response?.data;
+  const data = err?.response?.data as Record<string, any>;
   return data?.message || data?.error || defaultMessage || "";
 };