[wp-trac] [WordPress Trac] #27248: Use HTTP 4xx instead of 500 for comments posting errors

WordPress Trac noreply at wordpress.org
Sat Mar 1 11:59:00 UTC 2014


#27248: Use HTTP 4xx instead of 500 for comments posting errors
--------------------------+-----------------------------
 Reporter:  AmrMostafa    |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Comments      |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27248>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list