Issue Details (XML | Word | Printable)

Key: CODEBASE-201
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Jessie Keck
Reporter: Matt Mitchell
Votes: 0
Watchers: 0
Operations

Clone this issue
If you were logged in you would be able to see more operations.
Blacklight Plugin

catalog controller, index action recursive redirect if solr http error occurs

Created: 26/Jan/10 01:09 PM   Updated: 03/May/10 12:37 PM
Return to search
Component/s: None
Affects Version/s: 2.4
Fix Version/s: 2.5


 Description  « Hide
If a solr connection error is thrown, BL redirects endlessly. This is because it's capturing an RSolr::RequestError. RSolr needs to throw a connection exception, and then BL could handle properly. BL could also test the connection at boot time and throw a meaningful error.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Jonathan Rochkind added a comment - 06/Apr/10 08:33 PM
You know, the more I think about this, the more I think the current behavior of redirecting to home page (with a 200 HTTP status!) when a 'fatal' (caught at top level) error is encountered -- is just bad behavior in the first place. I'm always annoyed when vendors web apps do that (typically because I'm trying to screen scrape them, which hopefully nobody will have to do with Blacklight, but still, it's just bad web behavior).

Jessie, or anyone else, what do you think about having an un-caught top-level error simply display an actual error page (and return an HTTP 500 response code), instead of redirecting to home page at all? The error page could include a link back to the home page still.

But this seems like better behavior to me, AND will make the endless redirect go away as a byproduct.

What do you think?

[ Longer term, to REALLY be a good web citizen, many of those uncaught errors ought to be caught at the right place, and have the properly meaningful 4xx code displayed. For instance, a show URL to a document ID that doesn't exist should give a 404 with a more specific error message, not a 500 "something bad happened". But that's for a different ticket than this one, just mentioning it for thought. ]

Jessie Keck added a comment - 03/May/10 12:37 PM
Methods in CatalogController now used and can be overridden at the application level.
Returning 500 for solr error and 404 for invalid solr id.