diff --git a/lbry/wallet/network.py b/lbry/wallet/network.py index 0cf7c5377..240241a0c 100644 --- a/lbry/wallet/network.py +++ b/lbry/wallet/network.py @@ -480,7 +480,10 @@ class Network: async def new_claim_search(self, server, **kwargs): async with grpc.aio.insecure_channel(server) as channel: stub = hub_pb2_grpc.HubStub(channel) - response = await stub.Search(SearchRequest(**kwargs)) + try: + response = await stub.Search(SearchRequest(**kwargs)) + except grpc.aio.AioRpcError as error: + raise RPCError(error.code(), error.details()) return response async def sum_supports(self, server, **kwargs): diff --git a/tests/integration/blockchain/test_wallet_server_sessions.py b/tests/integration/blockchain/test_wallet_server_sessions.py index e633d11e2..0b079bbdc 100644 --- a/tests/integration/blockchain/test_wallet_server_sessions.py +++ b/tests/integration/blockchain/test_wallet_server_sessions.py @@ -205,4 +205,4 @@ class TestStress(CommandTestCase): await self.stream_create() with self.assertRaises(RPCError) as err: await self.claim_search(not_channel_ids=[("%040x" % i) for i in range(8196)]) - self.assertEqual(err.exception.message, 'not_channel_ids cant be set for more than 2048 items.') + self.assertEqual(err.exception.message, 'not_channel_ids cant have more than 2048 items.')