then(onSuccess).catch(onFailure) This one catches errors not only during the ajax request, but during the onSuccess handler execution. const response = ajax(options).then(onSuccess).catch(onFailure) The appropriate translation to async/await could be something like this: