Skip to content

Commit 5736f26

Browse files
committed
fix(admin-ui): use responseMessage from response body to display message
Signed-off-by: Jeet Viramgama <[email protected]>
1 parent 61a9bca commit 5736f26

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

admin-ui/app/redux/sagas/LicenseSaga.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ function* uploadNewSsaToken({ payload }) {
196196
yield put(checkLicenseConfigValidResponse(false))
197197
console.log(error)
198198
yield put(
199-
uploadNewSsaTokenResponse(error?.api_response?.body?.responseMessage || error.message)
199+
uploadNewSsaTokenResponse(error?.response?.body?.responseMessage || error.message)
200200
)
201201
}
202202
}

admin-ui/app/utils/ApiUtils.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@ const MAX_RETRIES = 1;
44

55
export function handleResponse(error, reject, resolve, data, response) {
66
if (error) {
7-
let combinedError = new Error(error.message);
8-
combinedError.error = error;
9-
if(response) {
10-
combinedError.api_response = response;
11-
}
12-
reject(combinedError)
7+
reject(error)
138
if (error?.message?.toLocaleLowerCase()?.includes('timeout')) {
149
store.dispatch(handleApiTimeout({ isTimeout: true }))
1510
}

0 commit comments

Comments
 (0)