code: def to_dict(self):
          
          rv = dict(self.payload or ())
          rv["message"] = self.message
          return rv
docs: Create a dict representation of this exception.
  
          :return: The dictionary representation.
          :rtype: dict