(code, message = "Server Error")
| 3 | export const CLEAN_ERRORS = "CLEAN_ERRORS"; |
| 4 | |
| 5 | export function addError(code, message = "Server Error") { |
| 6 | return (dispatch) => { |
| 7 | dispatch({ |
| 8 | type: ADD_ERROR, |
| 9 | error: { |
| 10 | pathname: window.location.pathname, |
| 11 | code, |
| 12 | message, |
| 13 | }, |
| 14 | }); |
| 15 | }; |
| 16 | } |
| 17 | |
| 18 | export function removeError(index) { |
| 19 | return (dispatch) => { |
no test coverage detected