psu-libraries / scholarsphere-3

A web application for ingest, curation, search, and display of digital assets. Powered by Hydra technologies (Rails, Hydra-head, Blacklight, Solr, Fedora Commons, etc.)
Apache License 2.0
78 stars 24 forks source link

Missing Template error/500 #607

Closed carolyncole closed 7 years ago

carolyncole commented 7 years ago

When I create a work And that creation errors Then the error page should load instead of the server error page screen shot 2017-02-03 at 8 13 23 am

ActionView::MissingTemplate (Missing template errors/500 with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder, :haml]}. Searched in:
  * "/opt/heracles/deploy/scholarsphere/releases/20170130164732/app/views"
  * "/opt/heracles/deploy/scholarsphere/shared/bundle/ruby/2.3.0/gems/devise-4.2.0/app/views"
  * "/opt/heracles/deploy/scholarsphere/shared/bundle/ruby/2.3.0/bundler/gems/flipflop-0eecddade989/app/views"
  * "/opt/heracles/deploy/scholarsphere/shared/bundle/ruby/2.3.0/bundler/gems/sufia-603e8fc8bd4f/app/views"
  * "/opt/heracles/deploy/scholarsphere/shared/bundle/ruby/2.3.0/gems/browse-everything-0.10.5/app/views"
  * "/opt/heracles/deploy/scholarsphere/shared/bundle/ruby/2.3.0/gems/hydra-batch-edit-2.1.0/app/views"
  * "/opt/heracles/deploy/scholarsphere/shared/bundle/ruby/2.3.0/bundler/gems/curation_concerns-b073550c40a1/app/views"
  * "/opt/heracles/deploy/scholarsphere/shared/bundle/ruby/2.3.0/gems/qa-0.10.2/app/views"
  * "/opt/heracles/deploy/scholarsphere/shared/bundle/ruby/2.3.0/gems/hydra-editor-3.1.2/app/views"
  * "/opt/heracles/deploy/scholarsphere/shared/bundle/ruby/2.3.0/gems/blacklight-gallery-0.6.1/app/views"
  * "/opt/heracles/deploy/scholarsphere/shared/bundle/ruby/2.3.0/gems/blacklight_advanced_search-6.2.1/app/views"
  * "/opt/heracles/deploy/scholarsphere/shared/bundle/ruby/2.3.0/gems/blacklight-6.7.2/app/views"
  * "/opt/heracles/deploy/scholarsphere/shared/bundle/ruby/2.3.0/gems/kaminari-0.17.0/app/views"
  * "/opt/heracles/deploy/scholarsphere/shared/bundle/ruby/2.3.0/gems/mailboxer-0.14.0/app/views"
):
  app/controllers/application_controller.rb:58:in `render_500'

A reliable way to reproduce this is to generate a 500 error by uploading a work with the following description.

The ignitibility behaviour of eleven coals ranging in rank trom low volatile bituminous to high volatile C bituminous has been examined by means of two laboratory tests. The ignition temperatures of dusts ranging in size from -6o+200 to -325 mesh (U. S. Sieve a.,_ries) were determined in oxygen and in air using the Godbert inflammability apparatus, in which 0.2 gram of coal was blown downwards through a heated, vertical ignition tube using 2000 cc. of gas at a pressure of 1211 mercury. The crossing-point temperatures in oxygen of 3.0 grBJI sampies of the -6o+200 mesh coals were obtained with a Setchk.in 'tg~ n1tion Apparatus :f.or solids. In this test the temperature/time his'4:\ tory of a coal was compared with that of the preheated oxygen with which it reacted under the standard conditions of the test. The crossing-point temperature was that at which the temperature/time curves of coal and 01tygen intersected. No correlation ,between the volatile content of the coals and either their ignition point temperatures in air or oxygen, or their crossing point temperatures in o~ygEtn, was found. Results with the inflammability apparatus showed, however, a definite decrease in ignition temperature with decrease in particle size. The following conclusions were drawn from the study: (1) The ~gnitibility of a bituminous coal is determined not by its total volatile content, but rather by the surface properties .of both the original and partially charred or carbonised particles. (2) Differences in the ignitibility of the bituminous class of coals are less marked than has sometimes been supposed; provided that sufficient oxygen is available, bituminous coals over a wide range of volatile contents will ignite at much the same ain.bient temperature wheh projected into a suitable hot environment in the size consist used for pulverised fuel firing, (3) The ignitibility of a cloud of coal dust particles increase~ as the particle size decreases. Particle size is more important in the ignition process than is the:i:rifluence of volatile content. 
carolyncole commented 7 years ago

This ticket should set up a template for handling individual errors with unique text. And then have a generic capture as well.

There are 11 errors that show 500 in the application.rb https://github.com/psu-stewardship/scholarsphere/blob/develop/app/controllers/application_controller.rb#L19-L35

We could possibly create code that looks up the wording from an I18N file.

Rescue: Error from #608 Bad rdf , which means bad metadata was entered "We can not process the metadata as entered. This usually occurs when unexpected characters are copied from another source. Try typing your metadata by hand. "

All pages should at least have: "If this error continues please use the <"contact form": link> for assistance uploading your content"