Skip to content

Commit

Permalink
[Ajax] Fix catch
Browse files Browse the repository at this point in the history
  • Loading branch information
hlecorche committed Nov 24, 2024
1 parent c6b390b commit cf4c5e0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions assets/js/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,7 @@ export function sendRequest (options) {
dataPromise.then(data => {
executeEventsAndCallbacksSuccess(callbacksSuccess, options, data, response)
resolve(response)
})

dataPromise.catch(error => {
}).catch(error => {
error = 'Error during fetching response body: ' + error
executeEventsAndCallbacksError(options, error, response)
reject(error)
Expand All @@ -216,9 +214,7 @@ export function sendRequest (options) {
resolve(response)
}
}
})

fetchPromise.catch(error => {
}).catch(error => {
error = 'Error during query execution: ' + error
executeEventsAndCallbacksError(options, error, null)
reject(error)
Expand Down

0 comments on commit cf4c5e0

Please sign in to comment.