qpixel
qpixel copied to clipboard
Going to nonexisting help or policy post gives error 500
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:
- Go to a non existing post under /help or /policy
- See error
Expected behavior In this case we should expect error 404 (page not found).
Screenshots

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.