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 17
17
import React from "react" ;
18
18
import { ConfirmModalIcon } from "mds" ;
19
19
import { api } from "api" ;
20
- import { errorToHandler } from "api/errors" ;
21
- import { setModalErrorSnackMessage } from "../../../../systemSlice" ;
20
+ import { setErrorSnackMessage } from "../../../../systemSlice" ;
22
21
import { useAppDispatch } from "../../../../store" ;
23
22
import ConfirmDialog from "screens/Console/Common/ModalWrapper/ConfirmDialog" ;
24
23
@@ -43,10 +42,18 @@ const DeleteTierConfirmModal = ({
43
42
closeModalAndRefresh ( true ) ;
44
43
} )
45
44
. 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 ) ;
47
54
} ) ;
48
55
} else {
49
- setModalErrorSnackMessage ( {
56
+ setErrorSnackMessage ( {
50
57
errorMessage : "There was an error deleting the tier" ,
51
58
detailedError : "" ,
52
59
} ) ;
You can’t perform that action at this time.
0 commit comments