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

Making WordPress.org noreply at wordpress.org
Fri Jan 12 00:56:20 UTC 2018


#111: Improve error when running plugins_api() with invalid slug
--------------------+------------------
 Reporter:  scribu  |       Owner:
     Type:  defect  |      Status:  new
 Priority:  low     |   Milestone:
Component:  API     |  Resolution:
 Keywords:          |
--------------------+------------------

Comment (by dd32):

 @obenland This is a core thing, not really an API thing. The API can't be
 changed as core (and perhaps other clients) expect `null` to mean `error`.

 For reference, here's what the current endpoints return:
 https://api.wordpress.org/plugins/info/1.1/?action=plugin_information&request[slug]=404
 -does-not-exist

 We can change the API to return something else instead of `N;` /`null`
 however doing so will cause WordPress itself to break. I've re-opened
 #wp20615 for that reason.

 However, Core is not currently using the `1.1` API (It's still using the
 `1.0` api) so what we can do is change the 1.1 error responses (I don't
 really care about non-WordPress clients in this case) so that when core is
 shifted to 1.1 it's error handling gets fixed at the same time.

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


More information about the wp-meta mailing list