features/extra/helpers.js
function unexpectedError(resp, next) {
    var svc = resp.request.service.api.serviceName;
    var op = resp.request.operation;
    var code = resp.error.code;
    var msg = resp.error.message;
    var err = 'Received unexpected error from ' + svc + '.' + op + ', ' + code + ': ' + msg;
    next.fail(new Error(err));
  }
function unexpectedError(resp, next) {
    var svc = resp.request.service.api.serviceName;
    var op = resp.request.operation;
    var code = resp.error.code;
    var msg = resp.error.message;
    var err = 'Received unexpected error from ' + svc + '.' + op + ', ' + code + ': ' + msg;
    next.fail(new Error(err));
  }
function unexpectedError ( resp , next ) { var svc = resp . request . service . api . serviceName ; var op = resp . request . operation ; var code = resp . error . code ; var msg = resp . error . message ; var err = 'Received unexpected error from ' + svc + '.' + op + ', ' + code + ': ' + msg ; next . fail ( new Error ( err ) ) ; }
Given a response that contains an error, this fails the current
step with a formatted error message that indicates which service and
operation failed.
Given a response that contains an error this fails the current step with a formatted error message that indicates which service and operation failed .