exceptions: Remove unused to_json method of JsonableError.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-08-13 18:18:13 -07:00
committed by Tim Abbott
parent 79f7f9b8d9
commit 27325eb2ae
2 changed files with 3 additions and 7 deletions

View File

@@ -118,11 +118,6 @@ class JsonableError(Exception):
def data(self) -> Dict[str, Any]:
return dict(((f, getattr(self, f)) for f in self.data_fields), code=self.code.name)
def to_json(self) -> Dict[str, Any]:
d = {"result": "error", "msg": self.msg}
d.update(self.data)
return d
def __str__(self) -> str:
return self.msg