[wp-trac] [WordPress Trac] #34999: Calling wp_die() in a REST API request should return valid JSON
WordPress Trac
noreply at wordpress.org
Mon Jan 18 07:33:49 UTC 2016
#34999: Calling wp_die() in a REST API request should return valid JSON
----------------------------------------------+----------------------------
Reporter: joehoyle | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
Component: REST API | Review
Severity: normal | Version: 4.4
Keywords: has-patch needs-unit-tests close | Resolution:
| Focuses:
----------------------------------------------+----------------------------
Changes (by rmccue):
* keywords: has-patch needs-unit-tests => has-patch needs-unit-tests close
Comment:
Replying to [comment:3 danielbachhuber]:
> At this point, I'd ''much'' prefer we avoid `wp_die()` invocations REST
requests. I don't think we'll be able to create a robust `wp_die()`
handler that does what we need it to without compatibility concerns.
Agreed and I think adding handling here will encourage people to use it.
The current behaviour (breaking the response) is probably a good thing.
Recommend close.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34999#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list