-
Notifications
You must be signed in to change notification settings - Fork 8
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
fail
should return HTTP Status!
#11
Comments
@Baterka are you really referring to Sorry, I'm not 100% certain that I understood the request. |
Closing for lack of clarification. |
@Prestaul I think what he's trying to say is that if he hits an internal server error, jsend should return the HTTP status as 500 error instead of 200 OK. Because right now as I am using JSend, that's what i realised, is that any response is a 200 OK |
@hoyikxian Exactly what I am trying to say |
Okay, that makes more sense than what I thought you were saying initially. This would be a breaking change and I'm thinking it would make the most sense to have have |
@Prestaul I'm looking forward to see this feature implemented.
I'm okay with that. |
It makes perfect sense. I understand approach "define statuses only by JSON" (How described in original specification), but it should have right HTTP statuses too as redundant. I forked your repo and did some changes. Merge it if you like it (but edit tests, because they are failing now) |
Yeah that would kind of make sense, but in the future you might want to be more specific with the http error codes. However, I am looking forward to the changes. |
I think
fail
should return HTTP error status too...For example: res.status(500).jsend.error({code: 500, message:"Internal Server Error"})
The text was updated successfully, but these errors were encountered: