fix quota connect middleware to emit error, not completely stop chain