Skip to content

Add error pages handling

Ghost User requested to merge development into staging

Goals

Have nicer error pages in production

  • 404 status
  • 500 status
  • 422 and 503 statuses

Changes

  • config/environments/production.rb : switched html exception handling to app router
  • config/routes.rb : added get routes for html exceptions
  • app/controllers/errors_controller.rb : added show method
  • app/views/errors/404-422-500-503.html.erb : added error page content
  • app/assets/images/error_pages.jpg : added background image for error pages
  • app/assets/stylesheets/main.scss : added custom style for error jumbotron

Tests

  • error page 404 is correctly displayed for non existing page/route : PASSED
  • don't know how to test the other HTML statuses
Edited by Ghost User

Merge request reports