websockets: Report exception when "TypeError" is caught
Signed-off-by: Eric Callahan <arksine.coded@gmail.com>
This commit is contained in:
parent
ffdcfd527a
commit
3b63205e70
|
@ -74,7 +74,7 @@ class JsonRPC:
|
||||||
try:
|
try:
|
||||||
result = await method(*args, **kwargs)
|
result = await method(*args, **kwargs)
|
||||||
except TypeError as e:
|
except TypeError as e:
|
||||||
return self.build_error(-32603, "Invalid params", req_id)
|
return self.build_error(-32603, f"Invalid params:\n{e}", req_id)
|
||||||
except ServerError as e:
|
except ServerError as e:
|
||||||
return self.build_error(e.status_code, str(e), req_id)
|
return self.build_error(e.status_code, str(e), req_id)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
Loading…
Reference in New Issue