Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 7186 Rev 7201
Línea 63... Línea 63...
63
      .then((response) => {
63
      .then((response) => {
64
        const { data, success } = response.data
64
        const { data, success } = response.data
Línea 65... Línea 65...
65
 
65
 
66
        if (!success) {
66
        if (!success) {
67
          const errorMessage =
67
          const errorMessage =
-
 
68
            typeof data === 'string'
-
 
69
              ? data
Línea 68... Línea 70...
68
            typeof data === 'string' ? data : labels.error_there_was_an_error
70
              : 'Error interno. Por favor, inténtelo de nuevo más tarde.'
69
 
71
 
70
          dispatch(addNotification({ style: 'danger', msg: errorMessage }))
72
          dispatch(addNotification({ style: 'danger', msg: errorMessage }))
Línea 80... Línea 82...
80
      })
82
      })
81
      .catch((error) => {
83
      .catch((error) => {
82
        dispatch(
84
        dispatch(
83
          addNotification({
85
          addNotification({
84
            style: 'danger',
86
            style: 'danger',
85
            msg: labels.error_there_was_an_error,
87
            msg: 'Error interno. Por favor, inténtelo de nuevo más tarde.',
86
          })
88
          })
87
        )
89
        )
88
        throw new Error(error)
90
        throw new Error(error)
89
      })
91
      })
90
  }
92
  }
Línea 100... Línea 102...
100
      .then((response) => {
102
      .then((response) => {
101
        const { data, success } = response.data
103
        const { data, success } = response.data
Línea 102... Línea 104...
102
 
104
 
103
        if (!success) {
105
        if (!success) {
104
          const errorMessage =
106
          const errorMessage =
-
 
107
            typeof data === 'string'
-
 
108
              ? data
Línea 105... Línea 109...
105
            typeof data === 'string' ? data : labels.error_there_was_an_error
109
              : 'Error interno. Por favor, inténtelo de nuevo más tarde.'
106
 
110
 
107
          dispatch(addNotification({ style: 'danger', msg: errorMessage }))
111
          dispatch(addNotification({ style: 'danger', msg: errorMessage }))
Línea 114... Línea 118...
114
      })
118
      })
115
      .catch((error) => {
119
      .catch((error) => {
116
        dispatch(
120
        dispatch(
117
          addNotification({
121
          addNotification({
118
            style: 'danger',
122
            style: 'danger',
119
            msg: labels.error_there_was_an_error,
123
            msg: 'Error interno. Por favor, inténtelo de nuevo más tarde.',
120
          })
124
          })
121
        )
125
        )
122
        throw new Error(error)
126
        throw new Error(error)
123
      })
127
      })
124
  }
128
  }