Es6 promise what should I do if all catch success have callbacks?

for example, when I transfer an api successfully, I have two callbacks. When the logic fails, there are also two callbacks. At this time, how to use promise to solve the callback?


promise.catch(() => {
    console.log('1')
})
promise.catch(() => {
    console.log('2')
})
Menu