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

TypeError: Cannot read property 'json' of undefined #456

Closed
koooge opened this issue Apr 5, 2018 · 3 comments
Closed

TypeError: Cannot read property 'json' of undefined #456

koooge opened this issue Apr 5, 2018 · 3 comments

Comments

@koooge
Copy link
Collaborator

koooge commented Apr 5, 2018

Hi. I got error

   "frisby": "^2.0.14",
    "jest": "^22.4.3",
    TypeError: Cannot read property 'json' of undefined
      
      at node_modules/frisby/src/frisby/spec.js:261:74

I doubt that _response(FrisbyResponse) becomes undefined when FrisbySpec throws Error before new FrisbyResponse
https://github.com/vlucas/frisby/blob/master/src/frisby/spec.js#L127-L133

@koooge
Copy link
Collaborator Author

koooge commented Apr 5, 2018

This issue seems to occur in case of server not response.
But this error shows frisby cannot handle the timeout error correctly.

refs? #429

@koooge
Copy link
Collaborator Author

koooge commented Apr 5, 2018

#447

H1Gdev added a commit to H1Gdev/frisby that referenced this issue Apr 7, 2018
vlucas added a commit that referenced this issue Apr 7, 2018
Fix #456 'TypeError: Cannot read property 'json' of undefined' issue.
@vlucas
Copy link
Owner

vlucas commented Apr 7, 2018

Released v2.0.15 with this fix. Please upgrade.

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