def METHOD_NAME(self):
    """
    :return: a representation of this error suitable for JSON encoding.
    """
    result = {"reason": self.reason}
    if self.extra_fields:
        result.update(self.extra_fields)
    return result