Skip to content

Commit

Permalink
Fix builds
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosthe19916 committed Apr 8, 2024
1 parent 4b8e78e commit ec6fbcc
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 11 deletions.
7 changes: 6 additions & 1 deletion ui-pf4/src/main/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@types/websocket": "^1.0.5",
"@types/yup": "0.29.6",
"antd": "4.7.0",
"axios": "0.21.4",
"axios": "1.6.0",
"axios-mock-adapter": "^1.21.2",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.7",
Expand Down Expand Up @@ -101,5 +101,10 @@
"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [
"prettier --write"
]
},
"jest": {
"moduleNameMapper": {
"^axios$": "axios/dist/node/axios.cjs"
}
}
}
4 changes: 2 additions & 2 deletions ui-pf4/src/main/webapp/src/store/alert/actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export const alertFetchEndpoint = (err: AxiosError) => {
if (err.response && err.response.data) {
if (typeof err.response.data === "string") {
errorDescription = err.response.data;
} else if (err.response.data.error) {
errorDescription = err.response.data.error;
} else if ((err.response.data as any).error) {
errorDescription = (err.response.data as any).error;
}
}
return (dispatch: Dispatch) => {
Expand Down
4 changes: 2 additions & 2 deletions ui-pf4/src/main/webapp/src/utils/modelUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ export const getErrorsFromLabelProviderEntity = (

// Axios error
export const getAxiosErrorMessage = (axiosError: AxiosError) => {
if (axiosError.response?.data.message) {
return axiosError.response?.data.message;
if ((axiosError.response?.data as any).message) {
return (axiosError.response?.data as any).message;
}
return axiosError.message;
};
28 changes: 22 additions & 6 deletions ui-pf4/src/main/webapp/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3503,12 +3503,14 @@ axios-mock-adapter@^1.21.2:
fast-deep-equal "^3.1.3"
is-buffer "^2.0.5"

axios@0.21.4:
version "0.21.4"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575"
integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==
axios@1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.0.tgz#f1e5292f26b2fd5c2e66876adc5b06cdbd7d2102"
integrity sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==
dependencies:
follow-redirects "^1.14.0"
follow-redirects "^1.15.0"
form-data "^4.0.0"
proxy-from-env "^1.1.0"

axios@^0.19.0:
version "0.19.2"
Expand Down Expand Up @@ -6042,7 +6044,7 @@ [email protected]:
dependencies:
tabbable "^5.3.2"

[email protected], follow-redirects@^1.0.0, follow-redirects@^1.14.0, follow-redirects@^1.15.6:
[email protected], follow-redirects@^1.0.0, follow-redirects@^1.15.0, follow-redirects@^1.15.6:
version "1.15.6"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b"
integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==
Expand Down Expand Up @@ -6092,6 +6094,15 @@ form-data@^3.0.0:
combined-stream "^1.0.8"
mime-types "^2.1.12"

form-data@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.8"
mime-types "^2.1.12"

form-data@~2.3.2:
version "2.3.3"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
Expand Down Expand Up @@ -10269,6 +10280,11 @@ proxy-addr@~2.0.7:
forwarded "0.2.0"
ipaddr.js "1.9.1"

proxy-from-env@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==

psl@^1.1.33:
version "1.9.0"
resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7"
Expand Down

0 comments on commit ec6fbcc

Please sign in to comment.