Skip to content
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

Merged
merged 2 commits into from
Jun 30, 2017

Conversation

pickypg
Copy link
Member

@pickypg pickypg commented Jun 30, 2017

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 the Notifier to display a helpful error rather than triggering one itself.

Note: err.data is explicitly null in this case, so it has it, but it is not useful, which is why this triggers a browser exception.

@pickypg pickypg added bug Fixes for quality problems that affect the customer experience v5.6.0 v6.0.0 labels Jun 30, 2017
@pickypg pickypg requested a review from spalger June 30, 2017 16:18
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?';
Copy link
Member

@tsullivan tsullivan Jun 30, 2017

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.

Copy link
Member Author

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.

Copy link
Member Author

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.

@pickypg
Copy link
Member Author

pickypg commented Jun 30, 2017

please test this

Copy link
Member

@tsullivan tsullivan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pickypg pickypg merged commit 2d0e2e4 into elastic:master Jun 30, 2017
@pickypg pickypg deleted the fix/allow-connection-failed branch June 30, 2017 20:05
@pickypg
Copy link
Member Author

pickypg commented Jun 30, 2017

5.x/5.6: 5e5ea2d

@jimgoodwin jimgoodwin added release_note:fix Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc labels Jul 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:fix Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v5.6.0 v6.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants