function errorRequest (client, request, err) {
  try {
    request.onError(err)
    assert(request.aborted)
  } catch (err) {
    client.emit('error', err)
  }
}
@param {import ('../dispatcher/client')} client
@param {import ('../core/request')} request
@param {Error} err