code: async def on_data_error(self, exception):
          
          self.logger.error('Encountered error on socket.',
                            exc_info=(type(exception), exception, None))
          await self.disconnect(expected=False)
docs: Handle error.