Fix rpc_message_to_error failing to construct them

This commit is contained in:
Lonami 2017-06-17 08:25:48 +02:00 committed by GitHub
parent 74a851b5cc
commit be33ae4e80

View File

@ -32,12 +32,12 @@ def rpc_message_to_error(code, message):
return cls(extra=extra)
elif code == 403:
return ForbiddenError()
return ForbiddenError(message)
elif code == 404:
return NotFoundError()
return NotFoundError(message)
elif code == 500:
return ServerError()
return ServerError(message)
return RPCError('{} (code {})'.format(message, code))