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

When Ajax request ends with error (5xx or 4xx), Piwik should display a friendly message notification #5406

Closed
mattab opened this issue Jul 3, 2014 · 2 comments
Assignees
Labels
Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Jul 3, 2014

As a Piwik user, when I am using Piwik and it fails for some technical reasons (server timeout, custom report takes too long to process, etc.) then I want to be notified that an error occured.

Reproduce:

  • when you trigger some time consuming action (i.e flatten report with thusands of sub-tables, or try to send a large scheduled email report manually), Piwik displays "loading" icon
  • after some time (usually 30 sec, as this is often default timeout) the request fails due to timeout (in developer console of browser I can see error no. 500 Internal server error).
  • the loading icon is still being shown leading users to confusion

Proposal:

  • when any Ajax request fails with 5xx or 4xx status:
  • display a Notification with a useful and friendly message
  • and hide the loading icons

Error message:

A good error message would:

  • apologize for the error,
  • explain what happened in layman terms,
  • what might be responsible for this, (eg. "Maybe the server had a temporary issue, or maybe you requested a report with too much data")
  • and what next steps to take. (eg. "If this error occurs repeatedly please <a>contact your Piwik administrator</a> for assistance")
@mattab mattab added this to the 2.5.0 - Piwik 2.5.0 milestone Jul 8, 2014
@tsteur tsteur self-assigned this Jul 21, 2014
tsteur added a commit that referenced this issue Jul 21, 2014
…o display an error message. Not sure yet about any side effects
tsteur added a commit that referenced this issue Jul 21, 2014
…splay a link to email sysadmin if possible
tsteur added a commit that referenced this issue Jul 21, 2014
…how an error if request was aborted and align the text left
@tsteur
Copy link
Member

tsteur commented Jul 21, 2014

Made sure loading indicator is no longer displayed and made sure an error message is displayed in case an error occurs if an error happens while loading a widget, a menu page or a dimension. Not sure if there are more cases. Looked through the code but haven't found any. I'd suggest to use it for a while and see...

If the API returns an error etc. the standard behavior is still there showing an actual notification.

You can tweak the text in General_ErrorRequest.

tsteur added a commit that referenced this issue Jul 21, 2014
tsteur added a commit that referenced this issue Jul 22, 2014
…r 5xx. Otherwise switching to another page while widgets are still loading will display this error message. The status is not abort but error in such a case
@mattab mattab added this to the Piwik 2.5.0 milestone Aug 3, 2014
@tsteur
Copy link
Member

tsteur commented Aug 6, 2014

Closing this issue. @mattab you can amend the message in General_ErrorRequest if you want

@tsteur tsteur closed this as completed Aug 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

2 participants