Skip to content

Commit

Permalink
OTR(Frontend) OPHOTRKEH-248: error handler for missing interpreters […
Browse files Browse the repository at this point in the history
…deploy]
  • Loading branch information
jrkkp committed Oct 24, 2023
1 parent 98a1f94 commit 937c577
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions frontend/packages/otr/src/redux/reducers/clerkInterpreter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ const clerkInterpreterSlice = createSlice({
state.missingStatus = APIResponseStatus.Success;
state.missingInterpreters = action.payload;
},
rejectClerkMissingInterpreters(state) {
state.missingStatus = APIResponseStatus.Error;
},
},
});

Expand All @@ -99,6 +102,7 @@ export const {
addClerkInterpreterFilter,
loadClerkInterpreters,
rejectClerkInterpreters,
rejectClerkMissingInterpreters,
resetClerkInterpreterFilters,
storeClerkInterpreters,
upsertClerkInterpreter,
Expand Down
3 changes: 2 additions & 1 deletion frontend/packages/otr/src/redux/sagas/clerkInterpreter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
loadClerkInterpreters,
loadClerkMissingInterpreters,
rejectClerkInterpreters,
rejectClerkMissingInterpreters,
storeClerkInterpreters,
storeClerkMissingInterpreters,
} from 'redux/reducers/clerkInterpreter';
Expand All @@ -21,7 +22,7 @@ function* loadClerkMissingInterpretersSaga() {
);
yield put(storeClerkMissingInterpreters(response.data));
} catch (error) {
yield put(rejectClerkInterpreters());
yield put(rejectClerkMissingInterpreters());
}
}

Expand Down

0 comments on commit 937c577

Please sign in to comment.