code: def _process_exception(e, body, tb):
      
      # get informations about message
      msg = e.message if hasattr(e, "message") else str(e)
      exception_type = str(e.__class__)
      exception_name = str(e.__class__.__name__)
  
      properties = pika.BasicProperties(
          content_type="application/text",
          delivery_mode=2,
          headers={
              "exception": msg,
              "exception_type": exception_type,
              "exception_name": exception_name,
              "traceback": tb,
              "UUID": str(uuid.uuid4())
          }
      )
  
      send_message("harvester", body, properties=properties)
docs: Process informations about exception and send them thru AMQP.
  
      Args:
          e (obj): Exception instance.
          body (str): Text which will be sent over AMQP.
          tb (obj): Traceback object with informations, which will be put to the
                    headers.