Skip to content
This repository has been archived by the owner on Sep 14, 2022. It is now read-only.

#stopWithError always returns status 500 - internal server error #201

Closed
andyskw opened this issue Mar 1, 2015 · 2 comments
Closed

#stopWithError always returns status 500 - internal server error #201

andyskw opened this issue Mar 1, 2015 · 2 comments

Comments

@andyskw
Copy link

andyskw commented Mar 1, 2015

The current version of swagger always throws {'message': 'internal error', 'code': 500} when #stopWithError(res, error) is called.

I think, this is an issue, and if so, I'd give a PR to fix it, as currently I am not able to use swagger to handle any errors other than the hardcoded ones. :)

@fehguy
Copy link
Contributor

fehguy commented Mar 3, 2015

That is really only invoked with building the resource listing or api declaration. Are you seeing otherwise? Per this: https://github.com/swagger-api/swagger-node-express#error-handling swagger is not consuming errors found when executing your operations, unless you've configured it to do so.

@fehguy
Copy link
Contributor

fehguy commented Jun 3, 2015

This is handled in #209

@fehguy fehguy closed this as completed Jun 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants