-
Notifications
You must be signed in to change notification settings - Fork 12
cli: fix exception on unestablished connection #210
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
Conversation
When you made connect but connection was not established yet cli would fail on call and event commands with exception. Add error message Connection in progress.
| } | ||
|
|
||
| call(interfaceName, methodName, args, callback) { | ||
| if (!this.cli.client) return callback(new Error('Not connected')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lundibundi
What do you say about removing redundant indentation by leaving line 91 as it was, and just adding this:
if (!this.cli.connection) return callback(new Error('Connection in progress'));There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@belochub it doesn't fit, does it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lundibundi, it doesn't fit where?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@belochub done.
belochub
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
When you made connect but connection was not established yet cli would fail on call and event commands with exception. Add error message Connection in progress. PR-URL: #210 Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
|
Landed in 6cb62a0. |
When you made connect but connection was not established yet cli would fail on call and event commands with exception. Add error message Connection in progress. PR-URL: #210 Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
When you made connect but connection was not established yet cli would fail on call and event commands with exception. Add error message Connection in progress. PR-URL: #210 Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
When you made connect but connection was not established yet cli would fail on call and event commands with exception.
Not sure about message in new error so feel free to suggest another one.