We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c97263d commit 519f4f5Copy full SHA for 519f4f5
main/api/chainport/vendor/requests.ts
@@ -85,11 +85,11 @@ const makeChainportRequest = async <T extends object>(
85
})
86
.catch((error) => {
87
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
88
- const chainportError = error.response?.data?.error?.description as string;
89
- if (chainportError) {
90
- throw new Error(chainportError);
+ const apiError = error.response?.data?.message as string;
+ if (apiError) {
+ throw new Error("Chainport error: " + apiError);
91
} else {
92
- throw new Error("Chainport error - " + error);
+ throw new Error("Chainport error: " + error);
93
}
94
});
95
0 commit comments