_handleAuthEvent (data = {}) {
    const { chanId, msg = '', status = '' } = data

    if (status !== 'OK') {
      const err = new Error(msg.match(/nonce/)
        ? 'auth failed: nonce small; you may need to generate a new API key to reset the nonce counter'
        : `auth failed: ${msg} (${status})`
      )

      debug('%s', err.message)
      this.emit('error', err)
      return
    }

    this._channelMap[chanId] = { channel: 'auth' }
    this._isAuthenticated = true

    this.emit('auth', data)
    debug('authenticated!')
  }
@param {object} data - incoming message
@private