<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def on_data_error(self, exception):
 """ Handle error. """

        self.logger.error('Encountered error on socket.',
                          exc_info=(type(exception), exception, None))
        await self.disconnect(expected=False)