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
better error message #8913
better error message #8913
Conversation
@@ -274,8 +274,8 @@ export class Messaging { | |||
handler = this.defaultHandler_; | |||
} | |||
if (!handler) { | |||
throw new Error( | |||
'Cannot handle request because handshake is not yet confirmed!'); | |||
throw new Error('Cannot handle request ' + message.name + |
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.
It's better to use args
, like this:
const error = new Error('Cannot handle ....');
error.args = request.name;
This way, we will be able to group errors by the message "Cannot handle..." and get a good total number, but still will be able to find the actual request name if we need to.
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.
done
* better error message * error
* better error message * error
* better error message * error
adding message name in the error message