Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: change the status code from 422 to 401 #706

Merged

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Apr 21, 2023

There is no need to change the status code since a validation error is still an authentication failure.
See #195 (comment)

15.5.21. 422 Unprocessable Content

The 422 (Unprocessable Content) status code indicates that the server understands the content type of the request content (hence a 415 (Unsupported Media Type) status code is inappropriate), and the syntax of the request content is correct, but it was unable to process the contained instructions. For example, this status code can be sent if an XML request content contains well-formed (i.e., syntactically correct), but semantically erroneous XML instructions.

http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
https://www.rfc-editor.org/rfc/rfc9110.html#section-15.5.21

There is no need to change the status code since a validation error is still an authentication failure.
See codeigniter4#195 (comment)
@kenjis kenjis added the documentation Improvements or additions to documentation label Apr 21, 2023
@kenjis kenjis mentioned this pull request Apr 21, 2023
2 tasks
Copy link
Collaborator

@datamweb datamweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM🥀

@datamweb
Copy link
Collaborator

I don't think we have any other feedback here.
merge.

@datamweb datamweb merged commit cc9305b into codeigniter4:develop Apr 22, 2023
@kenjis kenjis deleted the fix-docs-mobile_apps-response-code branch April 22, 2023 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants