Przeglądaj źródła

chore(deps): update axios error type

Pouria Ezzati 3 lat temu
rodzic
commit
f7c6df2f51
1 zmienionych plików z 1 dodań i 1 usunięć
  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 || "";
 };