explodinglabs/jsonrpcserver

AssertionErrors are swallowed in `handle_exceptions`

alvaro-garcia-carrasco opened this issue · 2 comments

Whenever an AssertionError is raised inside a method, it is handled as an InvalidParamsResponse by the exception handler and the exception does not get logged (here).

I have lots of assertion checks to verify the correct behaviour of the server and it becomes very difficult to debug errors raised by them.

Catching the assertion error there is mainly a legacy thing there. Before we had InvalidParamsError, Assertions were used to signal invalid params. I guess we should get rid of that in a major release.

bcb commented

Fixed in #148