cliffano / nestor

Jenkins CLI and node.js client
http://blog.cliffano.com/tag/nestor/
MIT License
182 stars 27 forks source link

Cannot read property 'headers' of undefined #56

Open jasperrooduijn opened 5 years ago

jasperrooduijn commented 5 years ago

I have used nestor for years with a lot of pleasure. Since a couple of weeks it stopped working. I keep getting this error: 'Cannot read property 'headers' of undefined'.

I'm using the following versions:

node --version -> v10.13.0 npm --version -> 6.4.1 nestor --version -> 2.0.0 nestor ver -> Gives me the following error -> unable to verify the first certificate

Job jobname was triggered successfully /usr/local/lib/node_modules/nestor/lib/cli/job.js:191 var buildUrl = response.headers.location; ^

TypeError: Cannot read property 'headers' of undefined at cb (/usr/local/lib/node_modules/nestor/lib/cli/job.js:191:35) at /usr/local/lib/node_modules/nestor/node_modules/swaggy-jenkins/src/ApiClient.js:458:9 at Request.callback (/usr/local/lib/node_modules/nestor/node_modules/superagent/lib/node/index.js:688:3) at ClientRequest. (/usr/local/lib/node_modules/nestor/node_modules/superagent/lib/node/index.js:615:10) at Object.onceWrapper (events.js:273:13) at ClientRequest.emit (events.js:182:13) at TLSSocket.socketErrorListener (_http_client.js:391:9) at TLSSocket.emit (events.js:182:13) at emitErrorNT (internal/streams/destroy.js:82:8) at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)

jasperrooduijn commented 4 years ago

@cliffano Did you had any chance to look at this? Would be great if i could use nestor again. Thanks.