-
Notifications
You must be signed in to change notification settings - Fork 913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] Proper error code when peer is not connected #3366
Comments
Would checking the error code not be more sensible? We can definitely assign a The errors really are distinct as they report various different causes that fwiw the "Unable to connect" error in response to |
@cdecker anything I can compare other than an error message would make sense. |
Add "peer not connected" and "unknown peer" as error codes, so that users can check against numeric error codes instead of textual error messages. Will ease ElementsProject#3366 Changelog-None
This should help #3395? The error "Unable to connect, no address known for peer" (https://github.com/ElementsProject/lightning/blob/f6ff5e5/connectd/connectd.c#L1431) is not returned during funding, but during connect. How to add a code for it? |
You will need to modify the message from connectd to lightningd, in file The type to use for the error code is a bit iffy though. You could cast to a |
Add "peer not connected" and "unknown peer" as error codes, so that users can check against numeric error codes instead of textual error messages. Will ease ElementsProject#3366 Changelog-None
Make it possible for connectd to send an error code to lightningd in addition to the error message. Introduce two new error codes, replacing the catch-all -1. This change, together with ElementsProject#3395 will implement ElementsProject#3366 Changelog-Changed: The `connect` command now returns its own error codes instead of a generic -1.
Make it possible for connectd to send an error code to lightningd in addition to the error message. Introduce two new error codes, replacing the catch-all -1. This change, together with ElementsProject#3395 will implement ElementsProject#3366 Changelog-Changed: The `connect` command now returns its own error codes instead of a generic -1.
Add "peer not connected" and "unknown peer" as error codes, so that users can check against numeric error codes instead of textual error messages. Will ease ElementsProject#3366 Changelog-None
Make it possible for connectd to send an error code to lightningd in addition to the error message. Introduce two new error codes, replacing the catch-all -1. This change, together with ElementsProject#3395 will implement ElementsProject#3366 Changelog-Changed: The `connect` command now returns its own error codes instead of a generic -1.
Make it possible for connectd to send an error code to lightningd in addition to the error message. Introduce two new error codes, replacing the catch-all -1. This change, together with ElementsProject#3395 will implement ElementsProject#3366 Changelog-Changed: The `connect` command now returns its own error codes instead of a generic -1.
Add "peer not connected" and "unknown peer" as error codes, so that users can check against numeric error codes instead of textual error messages. Will ease #3366 Changelog-None
Make it possible for connectd to send an error code to lightningd in addition to the error message. Introduce two new error codes, replacing the catch-all -1. This change, together with #3395 will implement #3366 Changelog-Changed: The `connect` command now returns its own error codes instead of a generic -1.
This can be closed now, after #3395 and #3397 have been merged, @NicolasDorier? |
@vasild thank you, closing it. I have not tested your PRs though, but it seems to be what I needed. |
Issue and Steps to Reproduce
At every release, lightningd is breaking clients due to not using proper error code when funding a channel to a peer that is not connected.
Workaround
Testing on several possible different error message thrown at each version of clightning.
btcpayserver/BTCPayServer.Lightning@f78bd5b#diff-3aa3aa916b8d25b5d374f2953506b989L357-R362
The text was updated successfully, but these errors were encountered: