def __to_json__(self) -> t.Mapping[t.Any, t.Any]:
"""Creates a JSON serializable representation of this object.
:returns: This APIException instance as a dictionary.
"""
ret = dict(self.rest) # type: t.MutableMapping[t.Any, t.Any]
ret['message'] = self.message
ret['description'] = self.description
ret['code'] = self.api_code.name
return ret
评论列表
文章目录