def handle_request(self, request):
    logging.debug(request)
    operation, message = request

    if not self.handlers in operation:
      logging.debug("operation {} not supported".format(operation))
      return

    handler = self.handlers[operation]

    try:
      message.message = json.loads(message.message)
      if 'message_id' in message.message:
        logging.info('parsing message_id: %r' % message.message['message_id'])
      handler(self).handle_request(message)
    except:
      logging.debug(message)
      logging.exception('error handling the request')


    # Save object to database for future reference
    db_class = self.db.operations[operation]
    if db_class:
      db_class(self.db).save(message)
dataset/ETHPy150Open orisi/orisi/src/oracle/oracle.py/Oracle.handle_request/swapped operands of `in`