Fix errors found by new tests (#1389)

This commit is contained in:
Tulir Asokan 2020-02-14 19:35:42 +02:00 committed by GitHub
parent c6bd620555
commit 95dc775344
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,7 @@ class RPCError(Exception):
super().__init__('RPCError {}: {}{}'.format( super().__init__('RPCError {}: {}{}'.format(
code or self.code, message, self._fmt_request(request))) code or self.code, message, self._fmt_request(request)))
self.request = request
self.code = code self.code = code
self.message = message self.message = message
@ -15,7 +16,7 @@ class RPCError(Exception):
return ' (caused by {})'.format(request.__class__.__name__) return ' (caused by {})'.format(request.__class__.__name__)
def __reduce__(self): def __reduce__(self):
return type(self), (self.code, self.message) return type(self), (self.request, self.message, self.code)
class InvalidDCError(RPCError): class InvalidDCError(RPCError):