[wp-meta] [Making WordPress.org] #111: Improve error when running plugins_api() with invalid slug

Making WordPress.org noreply at wordpress.org
Wed Jan 24 07:36:48 UTC 2018


#111: Improve error when running plugins_api() with invalid slug
--------------------+---------------------
 Reporter:  scribu  |       Owner:  dd32
     Type:  defect  |      Status:  closed
 Priority:  high    |   Milestone:
Component:  API     |  Resolution:  fixed
 Keywords:          |
--------------------+---------------------
Changes (by dd32):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"6422"]:
 {{{
 #!CommitTicketReference repository="" revision="6422"
 Plugin Directory: API: Return a proper error message for
 `api.wordpress.org/plugin/info/` when the plugin cannot be found.
 WordPress itself expects the null response, and currently uses the
 `info/1.0` endpoint which returns PHP, so we'll retain this carveout for
 it.

 These URLs now return an error message:
 https://api.wordpress.org/plugins/info/1.0/non-existant-plugin.json
 https://api.wordpress.org/plugins/info/1.0/non-existant-plugin.xml
 https://api.wordpress.org/plugins/info/1.1/?action=plugin_information&request[slug
 ]=non-existant-plugin

 Fixes #111.
 }}}

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/111#comment:4>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list