tested the error propogation to the done function of a promise