[wp-trac] [WordPress Trac] #34999: Calling wp_die() in a REST API request should return valid JSON
WordPress Trac
noreply at wordpress.org
Fri Dec 11 00:43:28 UTC 2015
#34999: Calling wp_die() in a REST API request should return valid JSON
-------------------------+------------------------------
Reporter: joehoyle | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: 4.4
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+------------------------------
Comment (by joehoyle):
From slack:
> rmccue [8:36 AM]
> I think we might break things by using exceptions
> `try { something(); throw Exception( 'remote request 404ed' ); } catch (
Exception $e ) { /* ignore */ }`
> If `something()` calls `wp_die`
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34999#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list