function onError(sender, err, cb) {
  callCallbacks(sender, err, cb);
  sender.onerror(err);
}
Handles a `Sender` error.

@param {Sender} sender The `Sender` instance
@param {Error} err The error
@param {Function} [cb] The first pending callback
@private