From 2c2af01c9ca31c268a5f7be119d2721209ac1811 Mon Sep 17 00:00:00 2001 From: EZZAHED Date: Fri, 14 Feb 2020 09:15:01 +0100 Subject: [PATCH] Update api.js Fix on error, onFailure my not be an action --- src/middleware/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middleware/api.js b/src/middleware/api.js index 13933b5..1ea0c4b 100644 --- a/src/middleware/api.js +++ b/src/middleware/api.js @@ -41,7 +41,7 @@ const apiMiddleware = ({ dispatch }) => next => action => { }) .catch(error => { dispatch(apiError(error)); - dispatch(onFailure(error)); + onFailure(error); if (error.response && error.response.status === 403) { dispatch(accessDenied(window.location.pathname));