File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
web-app/src/screens/Console/Configurations/TiersConfiguration Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 1717import React from "react" ;
1818import { ConfirmModalIcon } from "mds" ;
1919import { api } from "api" ;
20- import { errorToHandler } from "api/errors" ;
21- import { setModalErrorSnackMessage } from "../../../../systemSlice" ;
20+ import { setErrorSnackMessage } from "../../../../systemSlice" ;
2221import { useAppDispatch } from "../../../../store" ;
2322import ConfirmDialog from "screens/Console/Common/ModalWrapper/ConfirmDialog" ;
2423
@@ -43,10 +42,18 @@ const DeleteTierConfirmModal = ({
4342 closeModalAndRefresh ( true ) ;
4443 } )
4544 . catch ( ( err ) => {
46- dispatch ( setModalErrorSnackMessage ( errorToHandler ( err . error ) ) ) ;
45+ err . json ( ) . then ( ( body : any ) => {
46+ dispatch (
47+ setErrorSnackMessage ( {
48+ errorMessage : body . message ,
49+ detailedError : body . detailedMessage ,
50+ } ) ,
51+ ) ;
52+ } ) ;
53+ closeModalAndRefresh ( false ) ;
4754 } ) ;
4855 } else {
49- setModalErrorSnackMessage ( {
56+ setErrorSnackMessage ( {
5057 errorMessage : "There was an error deleting the tier" ,
5158 detailedError : "" ,
5259 } ) ;
You can’t perform that action at this time.
0 commit comments