-
-
Notifications
You must be signed in to change notification settings - Fork 33k
Open
Labels
httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.
Description
I am trying to write a spec-conforming microservice. The spec requires that I return HTTP 422 (Unprocessable Content)
in a specific situation:
https://www.rfc-editor.org/rfc/rfc9578.txt
If any of these conditions are not met, the Issuer MUST return an
HTTP 422 (Unprocessable Content)
error to the Client.
But when I return a 422, node.js attaches Unprocessable Entity
instead.
Line 158 in 57bc177
422: 'Unprocessable Entity', // RFC 4918 11.2 |
This issue for the (unrelated) Rust hyperium HTTP library explains it better than I can: hyperium/http#664
Both of the following RFCs define 422 but with a one-word difference:
- RFC 4918, "Proposed Standard", June 2007, "Unprocessable Entity"
- RFC 9110, "Internet Standard", June 2022, "Unprocessable Content"
Arguments in Favor of RFC 9110
- RFC 9110 is titled "HTTP Semantics" which is a direct fit for this library, whereas RFC 4918 is scoped to WebDAV.
- RFC 9110 is an Internet Standard while RFC 4918 is only a Proposed Standard.
- MDN uses RFC 9110 for the 422 status code
- RFC 9110 is newer (2022 vs. 2007)
Metadata
Metadata
Assignees
Labels
httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.