You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/utils/adapter.ts
+6-14Lines changed: 6 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,4 @@
1
1
importPostRobotfrom"post-robot";
2
-
import{Response}from"node-fetch";
3
2
import{
4
3
AxiosError,
5
4
AxiosHeaders,
@@ -50,11 +49,6 @@ export const dispatchAdapter =
50
49
});
51
50
};
52
51
/**
53
-
GitHub Copilot
54
-
To handle errors generically and robustly, we can refactor the code to ensure that all errors are properly processed and converted into a standardized format. Here's how you can fix and improve the error handling in the provided code:
55
-
56
-
Refactored Code
57
-
58
52
* Dispatches an API request using axios and PostRobot.
0 commit comments