Closed Ghnuberath closed 3 years ago
In TwirpClient's _make_request, ConnectionErrors are wrapped as TwirpServerExceptions:
TwirpClient
_make_request
ConnectionError
TwirpServerException
raise exceptions.TwirpServerException( code=errors.Errors.Unavailable, message=e.message, meta={"original_exception": e}, )
Which, in python3, causes an AttributError because ConnectionError does not have message anymore.
AttributError
message
I believe a simple fix would be to change this (and the Timeout error as well) to:
Timeout
raise exceptions.TwirpServerException( code=errors.Errors.Unavailable, message=str(e), meta={"original_exception": e}, )
In
TwirpClient
's_make_request
,ConnectionError
s are wrapped asTwirpServerException
s:Which, in python3, causes an
AttributError
becauseConnectionError
does not havemessage
anymore.I believe a simple fix would be to change this (and the
Timeout
error as well) to: