From f6ff5e5b19ce0894987659ac6f78bd0e21a34f54 Mon Sep 17 00:00:00 2001 From: lisa neigut Date: Wed, 4 Dec 2019 12:45:18 -0600 Subject: [PATCH] connectd: make failure message more descriptive --- connectd/connectd.c | 2 +- tests/test_connection.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/connectd/connectd.c b/connectd/connectd.c index a1bbbaf39..35f81ebb2 100644 --- a/connectd/connectd.c +++ b/connectd/connectd.c @@ -1428,7 +1428,7 @@ static void try_connect_peer(struct daemon *daemon, * to retry; an address may get gossiped or appear on the DNS seed. */ if (tal_count(addrs) == 0) { connect_failed(daemon, id, seconds_waited, addrhint, - "No address known"); + "Unable to connect, no address known for peer"); return; } diff --git a/tests/test_connection.py b/tests/test_connection.py index c5af38e5a..277e49cde 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -38,7 +38,7 @@ def test_connect(node_factory): assert len(l2.rpc.listpeers()) == 1 # Should get reasonable error if unknown addr for peer. - with pytest.raises(RpcError, match=r'No address known'): + with pytest.raises(RpcError, match=r'Unable to connect, no address known'): l1.rpc.connect('032cf15d1ad9c4a08d26eab1918f732d8ef8fdc6abb9640bf3db174372c491304e') # Should get reasonable error if connection refuse.