cmd: fix error parsed from status - #9605
Conversation
|
Important Review skippedAuto reviews are limited to specific labels. 🏷️ Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
d5c95ab to
55a221b
Compare
The `codes.Unimplemented` is only returned when the RPCs are not built. When the wallet is in an unexpected state, `codes.Unknown` is returned instead, so we need to catch it properly to make sure we return the right error msg.
55a221b to
e62aa7d
Compare
Fixes a bug introduced by lightningnetwork#9605, fixes lightningnetwork#9648. We need to use the "Unimplemented" code to detect whether the wallet is already unlocked. Otherwise we'll always get the wrong error message. But because the Unimplemented code can also occur if there is a mismatch between the build tags used for lncli and lnd, we also need to include that possibility in the erorr message to make sure the user can fix the problem.
Fixes a bug introduced by lightningnetwork#9605, fixes lightningnetwork#9648. We need to use the "Unimplemented" code to detect whether the wallet is already unlocked. Otherwise we'll always get the wrong error message. But because the Unimplemented code can also occur if there is a mismatch between the build tags used for lncli and lnd, we also need to include that possibility in the erorr message to make sure the user can fix the problem.
Fixes a bug introduced by lightningnetwork#9605, fixes lightningnetwork#9648. We return a specific error in the RPC permission interceptor for the case where the wallet is already unlocked or is still locked. We need to catch those errors correctly to give the user a bit more context on what to do.
A user was having trouble debugging its node, which was running in an
lndwithout thewalletrpcenabled. The user then tried to build thelncliwith the RPC enabled, but thelndnode could not be built since it was running remotely. Then the command failed with the following weird msg,This message is confusing as it doesn't show the RPC isn't built. This is now changed to,
In addition, this error msg is also fixed,
is now changed to,