qpixel icon indicating copy to clipboard operation
qpixel copied to clipboard

Going to nonexisting help or policy post gives error 500

Open Taeir opened this issue 3 years ago • 0 comments

Describe the bug When you go to a non existing help article or policy post (e.g. https://meta.codidact.com/help/bla), you get an error 500 (server error).

To Reproduce Steps to reproduce the behavior:

  1. Go to a non existing post under /help or /policy
  2. See error

Expected behavior In this case we should expect error 404 (page not found).

Screenshots image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser chrome
  • Version 104

Additional context The error is triggered from the categories_helper. It expects @post, @question, etc. to be non-nil. In this case, all are nil and we get an exception. The fix is also quite simple. I will post a pull request.

Taeir avatar Aug 13 '22 12:08 Taeir