Return 404 instead of 500 for missing forum thread - #3307
Conversation
|
@marcotuts Please have a look at the error message in discussion_thread_view.coffee |
There was a problem hiding this comment.
how about "does not exist or has been deleted" ?
There was a problem hiding this comment.
There's no way to reach this without selecting a thread, so it must have existed at some point.
There was a problem hiding this comment.
Currently when i put a bad url directly into the browser such as https://courses.edx.org/courses/BerkeleyX/CS-191x/2013_August/discussion/forum/i4x-BerkeleyX-CS191x-course-2013_Spring/threads/thisdoesnotexist then I get a 500. Does this PR change that?
There was a problem hiding this comment.
If you access a thread's URL directly, then we will return a 404 with the standard 404 page; this particular bit of code is handling an AJAX request for a thread.
Also show a more specific error message in the front end. This change only has an effect if using cs_comments_service commit 1d71330 or later.
|
Updated |
|
👍 |
|
:thumbs up: |
Return 404 instead of 500 for missing forum thread
Also show a more specific error message in the front end. This change
only has an effect if using cs_comments_service commit 1d71330 or later.