sciencehistory / scihist_digicoll

Science History Institute Digital Collections
Other
13 stars 0 forks source link

Unexpected constraint query string causes 500 #598

Closed jrochkind closed 4 years ago

jrochkind commented 4 years ago

I think it's that the params look like:

"f" => {"subject_facet" => {"0" => "Scientific apparatus and instruments"}},

A hash instead of an array. Not sure if our app produces this input somehow, or if it's just a bot trying it's own generated URLs.

But either way, unexpected input should probably not result in an uncaught exception, but should give a more well mannered error of some kind. This could be something that should be PR'd to Blacklight itself.

Needs more investigation.


[scihist_digicoll/production] ActionView::Template::Error: undefined method `strip' for #

Backtrace

line 45 of [PROJECT_ROOT]/app/views/featured_topic/index.html.erb: _app_views_featured_topic_index_html_erb___2730968338531252723_46980581612120
line 24 of [PROJECT_ROOT]/app/controllers/application_controller.rb: block in batch_kithe_indexable
line 23 of [PROJECT_ROOT]/app/controllers/application_controller.rb: batch_kithe_indexable

View full backtrace and more info at honeybadger.io

jrochkind commented 4 years ago

Very similar to #589, actually kind of a dup of that, exccept it's not place-specific after all.

eddierubeiz commented 4 years ago

HTTP_USER_AGENT is always: facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)"

jrochkind commented 4 years ago

Fixed by #812