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

fix(core): Add custom 400 and 404 error messages #1547

Merged
merged 3 commits into from
Oct 8, 2016

Conversation

mleanos
Copy link
Member

@mleanos mleanos commented Oct 7, 2016

Supersedes #1510

Other than the work put into this by @hyperreality, this PR adds:

Changed the error responses returned from the Sign Up & Sign In API
calls to use 422 rather than 400.

For insight into why this change was made:
#1510 (comment)

For reference on why to use 422 over 400:
https://www.bennadel.com/blog/2434-http-status-codes-for-invalid-data-400-vs-422.htm

Fixes #1504

hyperreality and others added 3 commits October 7, 2016 00:34
Changed the error responses returned from the Sign Up & Sign In API
calls to use 422 rather than 400.

For insight into why this change was made:
meanjs#1510 (comment)

For reference on why to use 422 over 400:
https://www.bennadel.com/blog/2434-http-status-codes-for-invalid-data-400-vs-422.htm
@mleanos mleanos changed the title Upstream fix(core): Add custom 400 and 404 error messages Oct 7, 2016
@coveralls
Copy link

coveralls commented Oct 7, 2016

Coverage Status

Coverage decreased (-0.1%) to 72.91% when pulling 6cff0d0 on mleanos:upstream into afe0d38 on meanjs:master.

@lirantal lirantal added this to the 0.5.0 milestone Oct 7, 2016
@lirantal
Copy link
Member

lirantal commented Oct 7, 2016

LGTM, no issues on the 422 on my behalf.

Copy link
Member

@lirantal lirantal left a comment

Choose a reason for hiding this comment

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

LGTM

@mleanos mleanos merged commit 6be12f8 into meanjs:master Oct 8, 2016
mleanos added a commit to mleanos/mean that referenced this pull request Oct 9, 2016
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 added a commit that referenced this pull request Oct 10, 2016
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:
6be12f8

Related:
#1547
#1510
lupinthethirdgentleman pushed a commit to lupinthethirdgentleman/mean-dashboard that referenced this pull request Aug 5, 2021
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/mean@6be12f8

Related:
meanjs/mean#1547
meanjs/mean#1510
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.

4 participants