function failed(err) {
        var msg = 'Unexpected test failure: ' + (err.message || err);
        if (err.body) {
            // yes, it really is "body.Message", not "body.message"
            msg += err.body.Message + " " + err.body.MessageDetail;
        } else if (err.statusText) {
            msg += err.statusText;
        }
        console.log(msg);
        expect.toFail(msg);
    }
******************************************************
All purpose failure reporter to be used within promise fails
*******************************************************