Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

fix(express): Incorrest uses of 400 error codes #1553

Merged
merged 1 commit into from
Oct 10, 2016

Conversation

mleanos
Copy link
Member

@mleanos mleanos commented Oct 9, 2016

Fixes incorrect usage of 400 HTTP responses being returned from the server, in favor of using 422.

Also, changed a couple return codes to 401 where it was more appropriate.

See this article for reasoning behind moving to 422, and why 400 isn't appropriate for these cases.
https://www.bennadel.com/blog/2434-http-status-codes-for-invalid-data-400-vs-422.htm

Reference:
6be12f8

Related:
#1547
#1510

Fixes incorrest usage of 400 HTTP responses being returned from the
server, in favor of using 422.

Also, changed a few return codes to 401 where it was more appropriate.

See this article for reasoning behind moving to 422, and why 400 isn't
appropriate for these cases.

For ref:
meanjs@6be12f8

Related:
meanjs#1547
meanjs#1510
@mleanos
Copy link
Member Author

mleanos commented Oct 9, 2016

In my haste to merge #1547, I forgot about the 400 error responses where we don't want to redirect the User. This resolves those issues.

@mleanos mleanos added this to the 0.5.0 milestone Oct 10, 2016
@mleanos mleanos self-assigned this Oct 10, 2016
@mleanos mleanos merged commit 0ea8cec into meanjs:master Oct 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant