[wp-trac] [WordPress Trac] #41604: REST API: Attempting to create or update a non-existent setting doesn't return an error response

WordPress Trac noreply at wordpress.org
Wed Jun 11 17:41:04 UTC 2025


#41604: REST API: Attempting to create or update a non-existent setting doesn't
return an error response
--------------------------------------+--------------------------
 Reporter:  johnbillion               |       Owner:  johnbillion
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  6.9
Component:  Options, Meta APIs        |     Version:
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:  rest-api
--------------------------------------+--------------------------
Changes (by johnbillion):

 * owner:  (none) => johnbillion
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"60301" 60301]:
 {{{
 #!CommitTicketReference repository="" revision="60301"
 REST API: Return a more appropriate HTTP 400 response code when attempting
 to create or update a non-existent setting.

 This switches the response from a 200, which is not appropriate for
 invalid requests.

 Props sheldorofazeroth, johnbillion

 Fixes #41604
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/41604#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list