DinoChiesa / apigee-edge-js

Library of functions wrapping the RESTful Administrative API of Apigee Edge. Find some working example utilities at https://github.com/DinoChiesa/apigee-edge-js-examples
Apache License 2.0
38 stars 23 forks source link

Cannot read property 'headers' of undefined #8

Closed bialesdaniel closed 5 years ago

bialesdaniel commented 5 years ago

I'm running into a weird error that pops up occasionally. I get the following message:

   let isJson = jsonRe.test(response.headers["content-type"]);
                                      ^

TypeError: Cannot read property 'headers' of undefined

I think it might have to do with the library getting a 401 back. I am using sso and an on-prem installation of Apigee. Its really weird because it works sometimes and not others. Any idea what could be causing this?

bialesdaniel commented 5 years ago

@DinoChiesa It seems like the error is Error: getaddrinfo ENOTFOUND which seems very odd.

bialesdaniel commented 5 years ago

I think this may be a local dns issue