Added failure to promise chain in callback functions.