code: function onResponse (res) {
        endTime = getTimeMs(endTime)
  
        res = Object.assign(res, { opDuration: endTime })
  
        if (res.error) {
          appendRes = res
        } else {
          log.info(
            {
              res: res,
              duration: endTime
            },
            'end of the request'
          )
        }
      }
docs: in case of res.error should fallback to the error emitter and should pass the res object