Opened 11 years ago
Closed 11 years ago
#27248 closed defect (bug) (duplicate)
Use HTTP 4xx instead of 500 for comments posting errors
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.9 |
Component: | Comments | Keywords: | |
Focuses: | Cc: |
Description
After you submit an invalid comment (empty comment, invalid email, etc), the displayed error page returns HTTP status code 500 which is to say that there is a server-side issue preventing this request from being successful. I believe a more correct response code would be something in the 4xx space, which says that there is an error in the request as sent by the client.
Practically, why does this matter?
Other than possibly confusing some HTTP middle layers, I think that anyone who is serious about their website will probably be watching the logs for server-side errors calling for their attention. This bug causes a spam-effect in the server error logs, making it difficult to see the actual server-side errors that needs fixing.
Use HTTP response code 400 instead of 500 for comment posting errors