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:
| [ | |
| { | |
| "color": "black", | |
| "category": "hue", | |
| "type": "primary", | |
| "code": { | |
| "rgba": [255,255,255,1], | |
| "hex": "#000" | |
| } | |
| }, |