|
@@ -29,7 +29,8 @@ const hideNotification = () => {
|
|
|
const notificationVisibilityReducer = createReducer(false, {
|
|
|
'LOGIN_FAILURE': showNotification,
|
|
|
'CHECK_TOKEN_FAILURE': hideNotification,
|
|
|
- 'HIDE_NOTIFICATION': hideNotification
|
|
|
+ 'HIDE_NOTIFICATION': hideNotification,
|
|
|
+ 'REQUEST_KO': showNotification
|
|
|
})
|
|
|
|
|
|
/**
|
|
@@ -46,6 +47,10 @@ const setNotificationMessage = (message, action) => {
|
|
|
return null
|
|
|
}
|
|
|
|
|
|
+ if (action.type === 'REQUEST_KO' && action.payload !== 401) {
|
|
|
+ return 'No se pudo procesar su petición, intente nuevamente'
|
|
|
+ }
|
|
|
+
|
|
|
return null
|
|
|
}
|
|
|
|
|
@@ -55,7 +60,8 @@ const setNotificationMessage = (message, action) => {
|
|
|
const notificationMessageReducer = createReducer(null, {
|
|
|
'LOGIN_FAILURE': setNotificationMessage,
|
|
|
'CHECK_TOKEN_FAILURE': setNotificationMessage,
|
|
|
- 'HIDE_NOTIFICATION': setNotificationMessage
|
|
|
+ 'HIDE_NOTIFICATION': setNotificationMessage,
|
|
|
+ 'REQUEST_KO': setNotificationMessage
|
|
|
})
|
|
|
|
|
|
/**
|