tilboerner / laserchicken

RSS reader web application built on Rails
MIT License
20 stars 3 forks source link

Error Messages for invalid feeds should be nore descriptive #11

Open devsnd opened 11 years ago

devsnd commented 11 years ago

Adding an URL that doesn't point to a feed should give a different error message than an incorrect URL (failed DNS resolution, HTTP 404 etc)

devsnd commented 11 years ago

Even worse, an application failure leads to an errormessage, that says

We're sorry, but something went wrong.

What can I do about it? This should be a "flash" instead of a page that resembles those 404 pages.

tilboerner commented 11 years ago

an application failure leads to [a generic error page]... This should be a "flash" instead

A bit hard to find a general solution here, since there's not much AJAX going on. Every laserchicken resource is an HTML page rendered and served by Rails; if an unanticipated exception crashes the serving thread before the response is rendered fully, there's not much that can be done to recover more gracefully.

Doing a redirect to root or some other functional path with an informative flash might create an error loop, which is bad.

That being said, it still means that these situations must be minimized, and indeed there are a couple of anticipated-but-uncaught exceptions at the moment. #15 deals with them.

tilboerner commented 11 years ago

Adding an URL that doesn't point to a feed should give a different error message than an incorrect URL

Agreed. There should at least be a discrimination between "destination unreachable" and "no feed at destination". In fact, feedzirra should already provide it, but currently only does so through undocumented behavior. If not resolved upstream (pull requests seem to take a while), maybe a local solution is in order.