Skip to content

Commit e2e10c7

Browse files
committed
[frontend] Don't notify errors when silenceErrors is set to true in the API utils
1 parent edcaf1f commit e2e10c7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

desktop/core/src/desktop/js/api/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,12 @@ const handleResponse = <T>(
162162
if (options && options.handleSuccess) {
163163
options.handleSuccess(response.data, resolve, reason => {
164164
reject(reason);
165-
notifyError(String(reason), response.data);
165+
notifyError(String(reason), response.data, options);
166166
});
167167
} else if ((!options || !options.ignoreSuccessErrors) && successResponseIsError(response.data)) {
168168
const errorMessage = extractErrorMessage(response && response.data);
169169
reject(errorMessage);
170-
notifyError(errorMessage, response);
170+
notifyError(errorMessage, response, options);
171171
} else {
172172
resolve(response.data);
173173
}
@@ -199,7 +199,7 @@ export const post = <T, U = unknown, E = string>(
199199
if (options && options.handleError) {
200200
options.handleError(err, resolve, reason => {
201201
handleErrorResponse(err, reject, options);
202-
notifyError(String(reason), err);
202+
notifyError(String(reason), err, options);
203203
});
204204
} else {
205205
handleErrorResponse(err, reject, options);

0 commit comments

Comments
 (0)