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

read statusCode from err.statusCode? #11

Closed
yorkie opened this issue Apr 9, 2015 · 5 comments
Closed

read statusCode from err.statusCode? #11

yorkie opened this issue Apr 9, 2015 · 5 comments
Assignees

Comments

@yorkie
Copy link
Contributor

yorkie commented Apr 9, 2015

Hi This is a question like the title, the loopback framework is using err.statusCode to expose the http status code. And I did know the preprocessor would address the issue.

However, I just think why not supporting statusCode from the error object, the node core is using this name, so should we use this as well?

Thanks !!!

@dougwilson
Copy link
Contributor

Can you point me to where the "node core" is using this field?

@yorkie
Copy link
Contributor Author

yorkie commented Apr 9, 2015

wow~ thanks for such quick reply, for your question, i mean here: https://iojs.org/api/http.html#http_response_statuscode

@dougwilson
Copy link
Contributor

OK I thought you meant node core was using err.statusCode somewhere

@yorkie
Copy link
Contributor Author

yorkie commented Apr 9, 2015

In fact I meant the loopback is using the statusCode, that is my pain for this issue, check this: https://github.com/strongloop/loopback/blob/master/common/models/user.js#L192, @dougwilson how do you think supporting statusCode as well? if lgtm, i'm glad to submit a pr for you :)

@dougwilson
Copy link
Contributor

I know it's used there. You just said node core as well, so I was confused. You can make a PR, yes, but it'll sit for a month or so, because some of these modules are still tied to Express 3 release schedules until it goes away.

Basically feel free because I was going to do it anyway, but don't expect a release soon :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants