Ticket #10318 (closed: fixed)

Opened 6 years ago

Last modified 6 years ago

Implement logic to correctly handle 404 and 500 error

Reported by: MarcusNoble Owned by: MarcusNoble
Priority: minor Milestone: Release 3.3
Component: Tools Keywords: AUTOREDUCTION
Cc: doucetm@…, tom.griffin@…, nick.draper@…, anders.markvardsen@… Blocked By: #10286
Blocking: Tester: Lottie Greenwood

Description (last modified by MarcusNoble) (diff)

Currently Django seems to be throwing any problem as a 400 bad request. Missing pages and server exceptions need to be handled separately.

404.html and 500.html also seems to show the login link instead of the menu options. Need some way of passing in the authenticated user.

This may be to do with ALLOWED_HOSTS in settings.py

Also need to handle additional status codes (such as 403)

For Tester:

Before testing this ticket, please check with me that the server isn't in Debug mode (as this bypasses all custom error pages).

  1. Navigate to http://datareducedev.isis.cclrc.ac.uk/autoreduce_webapp/notaurl
  2. Verify a custom 404 page is display
  3. If you aren't down as an instrument scientist/admin navigate to: http://datareducedev.isis.cclrc.ac.uk/autoreduce_webapp/instrument/GEM/
  4. Verify a custom forbidden page is shown, similar to the 404 page.

Change History

comment:1 Changed 6 years ago by MarcusNoble

  • Blocked By 10286 removed

(In #10286) Note: The logic for handling 404 and 500 errors is not currently working. See #10318

comment:1 Changed 6 years ago by MarcusNoble

  • Status changed from new to assigned
  • Blocked By 10286 added

comment:2 Changed 6 years ago by MarcusNoble

  • Description modified (diff)

comment:3 Changed 6 years ago by MarcusNoble

  • Description modified (diff)

comment:4 Changed 6 years ago by MarcusNoble

  • Description modified (diff)

comment:5 Changed 6 years ago by MarcusNoble

  • Status changed from assigned to verify
  • Resolution set to fixed
  • Description modified (diff)

comment:6 Changed 6 years ago by Lottie Greenwood

  • Status changed from verify to verifying
  • Tester set to Lottie Greenwood

comment:7 Changed 6 years ago by Lottie Greenwood

  • Status changed from verifying to closed

Both 404 and 403 page work as expected.

Last edited 6 years ago by Lottie Greenwood (previous) (diff)
Note: See TracTickets for help on using tickets.