code: function reject(err, async) {
      err = toErr(err);
      if (async) {
          return Promise.reject(err);
      } else {
          throw err;
      }
  }
docs: Reject with the given error. Returns a rejected promise if async, throws otherwise.