<p>During the course of this morning, Nomination lookups appear to have been intermittently returning HTML instead of JSON.  This results in a the Search handler filling the search box with the error result for that provider.  Ideally if a search provider fails it should show as though there were no valid results from that provider.</p>

<p>To reproduce:</p>

<ol>
<li>Enter 'x' in the Search box and Click 'Go'</li>
</ol>

<p>What happens:</p>

<ol>
<li>Observe that the search results show an error </li>
</ol>

<p>What should happen:</p>

<ol>
<li>The search results from Nomination should be empty or show "No results found"/"No results returned"; allowing the Geonames results to be visible above the fold.</li>
</ol>

<p>The error message (shown in red) is:</p>

<pre><code>Error contacting nominatim.openstreetmap.org: #<REXML::ParseException: Missing end tag for 'p' (got "body") Line: 14 Position: 513 Last 80 unconsumed characters: > /usr/lib/ruby/1.9.1/rexml/parsers/baseparser.rb:335:in `pull_event' /usr/lib/ruby/1.9.1/rexml/parsers/baseparser.rb:183:in `pull' /usr/lib/ruby/1.9.1/rexml/parsers/treeparser.rb:22:in `parse' /usr/lib/ruby/1.9.1/rexml/document.rb:249:in `build' /usr/lib/ruby/1.9.1/rexml/document.rb:43:in `initialize' /srv/www.openstreetmap.org/rails/app/controllers/geocoder_controller.rb:293:in `new' /srv/www.openstreetmap.org/rails/app/controllers/geocoder_controller.rb:293:in `fetch_xml' /srv/www.openstreetmap.org/rails/app/controllers/geocoder_controller.rb:145:in `search_osm_nominatim' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_controller/metal/implicit_render.rb:4:in `send_action' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/abstract_controller/base.rb:198:in `process_action' /var/lib/gems/1.9.1/gems/action
 pack-4.2.1/lib/action_controller/metal/rendering.rb:10:in `process_action' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action' /var/lib/gems/1.9.1/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /var/lib/gems/1.9.1/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /var/lib/gems/1.9.1/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /var/lib/gems/1.9.1/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /var/lib/gems/1.9.1/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /var/lib/gems/1.9.1/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /var/lib/gems/1.9.1/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_process_action_callbacks' /var/lib/gems/1.9.1/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /var/lib/gems/1.9.
 1/gems/actionpack-4.2.1/lib/abstract_controller/callbacks.rb:19:in `process_action' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_controller/metal/rescue.rb:29:in `process_action' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action' /var/lib/gems/1.9.1/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `block in instrument' /var/lib/gems/1.9.1/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /var/lib/gems/1.9.1/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `instrument' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_controller/metal/instrumentation.rb:30:in `process_action' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_controller/metal/params_wrapper.rb:250:in `process_action' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/railties/controller_runtime.rb:18:in `process_action' /var/lib/gems/1.9.1/gems/
 actionpack-4.2.1/lib/abstract_controller/base.rb:137:in `process' /var/lib/gems/1.9.1/gems/actionview-4.2.1/lib/action_view/rendering.rb:30:in `process' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_controller/metal.rb:196:in `dispatch' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_controller/metal.rb:237:in `block in action' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb:74:in `call' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb:74:in `dispatch' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb:43:in `serve' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_dispatch/journey/router.rb:43:in `block in serve' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_dispatch/journey/router.rb:30:in `each' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_dispatc
 h/journey/router.rb:30:in `serve' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb:819:in `call' /var/lib/gems/1.9.1/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:186:in `call!' /var/lib/gems/1.9.1/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:164:in `call' /var/lib/gems/1.9.1/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:186:in `call!' /var/lib/gems/1.9.1/gems/omniauth-1.2.2/lib/omniauth/strategy.rb:164:in `call' /var/lib/gems/1.9.1/gems/omniauth-1.2.2/lib/omniauth/builder.rb:59:in `call' /var/lib/gems/1.9.1/gems/oauth-plugin-0.5.1/lib/oauth/rack/oauth_filter.rb:75:in `call' /var/lib/gems/1.9.1/gems/rack-cors-0.4.0/lib/rack/cors.rb:80:in `call' /srv/www.openstreetmap.org/rails/config/initializers/cors.rb:9:in `call' /var/lib/gems/1.9.1/gems/http_accept_language-2.0.5/lib/http_accept_language/middleware.rb:14:in `call' /var/lib/gems/1.9.1/gems/rack-1.6.0/lib/rack/etag.rb:24:in `call' /var/lib/gems/1.9.1/gems/rack-1.6.0/lib/rack/conditionalget.rb:25:in 
 `call' /var/lib/gems/1.9.1/gems/rack-1.6.0/lib/rack/head.rb:13:in `call' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_dispatch/middleware/flash.rb:260:in `call' /var/lib/gems/1.9.1/gems/rack-1.6.0/lib/rack/session/abstract/id.rb:225:in `context' /var/lib/gems/1.9.1/gems/rack-1.6.0/lib/rack/session/abstract/id.rb:220:in `call' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_dispatch/middleware/cookies.rb:560:in `call' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:649:in `call' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call' /var/lib/gems/1.9.1/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `call' /var/lib/gems/1.9.1/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `_run_callbacks' /var/lib/gems/1.9.1/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_call_callbacks' /var/lib/gems/1.9.1/gems/activesupp
 ort-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_dispatch/middleware/callbacks.rb:27:in `call' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_dispatch/middleware/remote_ip.rb:78:in `call' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call' /var/lib/gems/1.9.1/gems/railties-4.2.1/lib/rails/rack/logger.rb:38:in `call_app' /var/lib/gems/1.9.1/gems/railties-4.2.1/lib/rails/rack/logger.rb:20:in `block in call' /var/lib/gems/1.9.1/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /var/lib/gems/1.9.1/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /var/lib/gems/1.9.1/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /var/lib/gems/1.9.1/gems/railties-4.2.1/lib/rails/rack/
 logger.rb:20:in `call' /var/lib/gems/1.9.1/gems/actionpack-4.2.1/lib/action_dispatch/middleware/request_id.rb:21:in `call' /var/lib/gems/1.9.1/gems/rack-1.6.0/lib/rack/methodoverride.rb:22:in `call' /var/lib/gems/1.9.1/gems/rack-1.6.0/lib/rack/runtime.rb:18:in `call' /var/lib/gems/1.9.1/gems/activesupport-4.2.1/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' /var/lib/gems/1.9.1/gems/rack-1.6.0/lib/rack/sendfile.rb:113:in `call' /var/lib/gems/1.9.1/gems/railties-4.2.1/lib/rails/engine.rb:518:in `call' /var/lib/gems/1.9.1/gems/railties-4.2.1/lib/rails/application.rb:164:in `call' /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:89:in `process_request' /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:149:in `accept_and_process_next_request' /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop' /usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:414:in 
 `block (3 levels) in start_threads' /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:111:in `block in create_thread_and_abort_on_exception' ... Missing end tag for 'p' (got "body") Line: 14 Position: 513 Last 80 unconsumed characters: Line: 14 Position: 513 Last 80 unconsumed characters: 
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/openstreetmap/openstreetmap-website/issues/969">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABWnLfqHrPThRNbiCn7IYuS7HRCIlh5Dks5oJCZygaJpZM4EaDg2.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/openstreetmap/openstreetmap-website/issues/969"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>