Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 7098 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 7098 Rev 7201
Línea 82... Línea 82...
82
      .then((response) => {
82
      .then((response) => {
83
        const { success, data } = response.data
83
        const { success, data } = response.data
Línea 84... Línea 84...
84
 
84
 
85
        if (!success) {
85
        if (!success) {
86
          const errorMessage =
86
          const errorMessage =
-
 
87
            typeof data === 'string'
-
 
88
              ? data
Línea 87... Línea 89...
87
            typeof data === 'string' ? data : labels.error_there_was_an_error
89
              : 'Error interno. Por favor, inténtelo de nuevo más tarde.'
88
 
90
 
89
          dispatch(addNotification({ style: 'danger', msg: errorMessage }))
91
          dispatch(addNotification({ style: 'danger', msg: errorMessage }))
Línea 95... Línea 97...
95
      })
97
      })
96
      .catch((err) => {
98
      .catch((err) => {
97
        dispatch(
99
        dispatch(
98
          addNotification({
100
          addNotification({
99
            style: 'error',
101
            style: 'error',
100
            msg: labels.error_there_was_an_error,
102
            msg: 'Error interno. Por favor, inténtelo de nuevo más tarde.',
101
          })
103
          })
102
        )
104
        )
103
        throw new Error(err)
105
        throw new Error(err)
104
      })
106
      })
105
      .finally(() => {
107
      .finally(() => {
Línea 115... Línea 117...
115
      .then((response) => {
117
      .then((response) => {
116
        const { data, success } = response.data
118
        const { data, success } = response.data
Línea 117... Línea 119...
117
 
119
 
118
        if (!success) {
120
        if (!success) {
119
          const errorMessage =
121
          const errorMessage =
-
 
122
            typeof data === 'string'
-
 
123
              ? data
Línea 120... Línea 124...
120
            typeof data === 'string' ? data : labels.error_there_was_an_error
124
              : 'Error interno. Por favor, inténtelo de nuevo más tarde.'
121
 
125
 
122
          dispatch(addNotification({ style: 'danger', msg: errorMessage }))
126
          dispatch(addNotification({ style: 'danger', msg: errorMessage }))