wallabag / android-app

Android application to read your articles saved in your wallabag. You can also easily add new articles.
https://www.wallabag.org
GNU General Public License v3.0
462 stars 260 forks source link

Improve error notification text: HTTP response: 500 Internal Server Error #731

Open NWuensche opened 5 years ago

NWuensche commented 5 years ago

Issue details

When adding a big website (i.e. https://norvig.com/big.txt ) to wallabag, I get a "Server error" notification with the exception com.di72nn.stuff.wallabag.apiwrapper.exceptions.UnsuccessfulResponseException and the text "HTTP response: 500 Internal Server Error"

Duplicate?

Have you searched the issues of this repository if your issue is already known? yes

Actual behaviour

See the issue details.

Expected behaviour

There should be a notification that clarifies what went wrong, not an exception. Maybe there shouldn't be a notification at all.

Steps to reproduce the issue

  1. Add https://norvig.com/big.txt to the wallabag server ( I used the share option in Opera on my phone to do this)
  2. Start syncing on the phone
  3. Get the exception Note: After a random amount of retries, the article will be downloaded to the phone. However, the website gets downloaded without any content. I don't know if this is a problem with the content fetcher, as the item doesn't have any text on the server too.

Environment details

Logs

wallabag server

Please paste relevant wallabag server logs here (from file <wallabag>/var/logs/prod.log):

Web server

Please paste relevant web server logs (e.g. from nginx, Apache, …) here: Nothing was written in var/logs/prod.log. NOTE: Be super sure to remove sensitive data like passwords, note that everybody can look here!

Your experience with wallabag Android app

Have you had any luck using wallabag Android app before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders) Yup, works super fine when it is set up :) Never had any critical issues.

Strubbl commented 5 years ago

This is a server side issue as the error is a 500. I guess your wallabag instance times out when adding the long article.

NWuensche commented 5 years ago

However, should the error really be shown to the user? Shouldn't it be handled like in #728 ? If so, I will fix it.

Strubbl commented 5 years ago

How is the message displayed? Via toast? I like if we have a more understandable user message, but the original message should not be left out. There some users out there, who understand what http code 500 means. Complicated question…

NWuensche commented 5 years ago

No, it's displayed as a notification. If this is not the right name, I mean these ones: https://developer.android.com/training/notify-user/build-notification . Maybe one should leave the title of the notification as "Server Error", but change the text into "Error while syncing with the server (HTTP 500)"?

Strubbl commented 5 years ago

Sorry, i fear this message would not be very expressive, too. Syncing with the server does not express that the app is not guilty for this behavior and it is the server's fault that syncing failed.