We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9a41f8 commit 3d2ce5eCopy full SHA for 3d2ce5e
webapp/_webapp/src/libs/apiclient.ts
@@ -136,6 +136,13 @@ class ApiClient {
136
} catch (error) {
137
if (error instanceof AxiosError) {
138
const errorData = error.response?.data;
139
+ if (!errorData || typeof errorData !== "object") {
140
+ const message = error.message || "Network error";
141
+ if (!options?.ignoreErrorToast) {
142
+ errorToast(message, "Request Failed");
143
+ }
144
+ throw new Error(message);
145
146
const errorPayload = fromJson(ErrorSchema, errorData);
147
if (!options?.ignoreErrorToast) {
148
const message = this.cleanErrorMessage(errorPayload.message);
0 commit comments