mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
exceptions: Remove unused to_json method of JsonableError.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
79f7f9b8d9
commit
27325eb2ae
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user