-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Toast Notification should handle connection failed #12609
Conversation
rtn += 'Error ' + err.status + ' ' + err.statusText + ': ' + err.data.message; | ||
if (err.status === -1) { | ||
// status = -1 indicates that the request was failed to reach the server | ||
rtn += 'Connection failed! Is Kibana running?'; |
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.
This message feels a little accusatory towards the user. How about something. Like:
A request to the Kibana server has failed to connect. Please check if the Kibana server is running and that your browser has a working connection to the Internet.
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.
I like it, but I'm going to drop the to the Internet
part at the end to avoid confusing users running it locally / internally on an intranet.
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.
Ended up with:
An HTTP request has failed to connect. Please check if the Kibana server is running and that your browser has a working connection, or contact your system administrator.
please test this |
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
5.x/5.6: 5e5ea2d |
I noticed this happen while using the
Notifier
to send a failure to it from Angular that was unable to reach the server. This allows theNotifier
to display a helpful error rather than triggering one itself.Note:
err.data
is explicitlynull
in this case, so ithas
it, but it is not useful, which is why this triggers a browser exception.