Spaces:
Runtime error
Runtime error
feat: added custom error for Axios
Browse files- src/services/api/axios.ts +10 -0
src/services/api/axios.ts
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { AxiosError } from "axios";
|
2 |
+
|
3 |
+
export interface CustomAxiosError extends AxiosError {
|
4 |
+
data?: {
|
5 |
+
error?: {
|
6 |
+
message?: string;
|
7 |
+
code?: string;
|
8 |
+
};
|
9 |
+
};
|
10 |
+
}
|