[wp-trac] [WordPress Trac] #63836: Use more appropriate HTTP status codes for wp_die
WordPress Trac
noreply at wordpress.org
Tue Aug 19 18:20:14 UTC 2025
#63836: Use more appropriate HTTP status codes for wp_die
-----------------------------------+------------------------------
Reporter: kkmuffme | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: minor | Resolution:
Keywords: 2nd-opinion has-patch | Focuses:
-----------------------------------+------------------------------
Changes (by mindctrl):
* keywords: needs-patch 2nd-opinion => 2nd-opinion has-patch
Comment:
+1 for returning the most appropriate status code when possible. The patch
works as expected. I like the limited scope, but curious what leads think.
TIL the 423 status code is meant for WebDAV. MDN has this note:
> Note: The ability to lock a resource to prevent conflicts is specific to
some WebDAV servers. Browsers accessing web pages will never encounter
this status code; in the erroneous cases it happens, they will handle it
as a generic 400 status code.
Source: https://developer.mozilla.org/en-
US/docs/Web/HTTP/Reference/Status/423
Maybe those should be 400 instead.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63836#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list