Added handler for promise chain errors