This code goes into resolve:
Promise.resolve(Promise.reject(123).catch(v => console.log(v))) .then(() => console.log(1), () => console.error(2)) But I do not understand why. Before cath, reject is returned. Further catch intercepts it. Thus, the reject is neutralized.
As a result, it is not clear what exactly causes the first handler to work in the then