Skip to content

Commit f822ea2

Browse files
enhanced error middleware to handle sam wizard issues.
1 parent 5eccc8f commit f822ea2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/store/middleware/errorMiddleware.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@ export const errorMiddleware =
1111
const { getState } = store
1212
const state = getState()
1313
const setupCompleted = state.app?.setupCompleted
14+
let SamWizardError = false
15+
if (action?.meta?.arg?.originalArgs?.path === '/api/ExecSamSetup') {
16+
SamWizardError = true
17+
}
1418
if (
1519
isRejectedWithValue(action) &&
1620
!action.error?.hideToastError &&
1721
action.payload.message !== 'canceled' &&
18-
setupCompleted
22+
(setupCompleted || SamWizardError)
1923
) {
2024
if (action.payload.data === 'Backend call failure') {
2125
action.payload.data =

0 commit comments

Comments
 (0)