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

Using Object.keys on non object #571

Closed
fabiancook opened this issue Sep 14, 2015 · 0 comments
Closed

Using Object.keys on non object #571

fabiancook opened this issue Sep 14, 2015 · 0 comments
Milestone

Comments

@fabiancook
Copy link

I am experiencing an error when my response isn't an object ( or example if it were just a number )

Referring to the if statement here: https://github.com/swagger-api/swagger-js/blob/master/lib/http.js#L223

I would assume that the body will be null or undefined if it wasn't parseable by superagent, given this is the case we could just check for the value to exist, if it doesn't then try parse the original text as YAML

@fehguy fehguy modified the milestone: v2.1.7 Nov 3, 2015
@fehguy fehguy closed this as completed in 037039c Nov 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants