Fix a bug with error handling in API middleware
This commit is contained in:
parent
942d123791
commit
28bff9cece
@ -242,7 +242,10 @@ export default store => next => reduxAction => {
|
|||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
if (failureDispatch) {
|
if (failureDispatch) {
|
||||||
store.dispatch(failureDispatch(error.message));
|
if (typeof error !== "string") {
|
||||||
|
error = error.message;
|
||||||
|
}
|
||||||
|
store.dispatch(failureDispatch(error));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user