Opened 8 years ago
Closed 8 years ago
#39530 closed defect (bug) (worksforme)
When posting too many comments via API, the error response is HTML, not JSON
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.7 |
Component: | REST API | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description (last modified by )
Basically it sends this HTML response:
<body id="error-page"> <p>You are posting comments too quickly. Slow down.</p></body> </html>
Change History (5)
#3
@
8 years ago
- Milestone changed from Awaiting Review to 4.8
- Owner set to joehoyle
- Status changed from new to assigned
I'll try get a patch.
#4
@
8 years ago
- Keywords reporter-feedback added
I took a look into this and was unable to reproduce. I tested with anonymous users creating comment and verified the response is the expected:
{"code":"comment_flood","message":"You are posting comments too quickly. Slow down.","data":{"status":400}}
@martinmalinda could you attached the request details for the exact request you are making?
Note: See
TracTickets for help on using
tickets.
Thought we caught this previously. Basically, the underlying functions that the comment controller calls check for comment floods, then call
wp_die
.