Fix response being undefined

Response object can be undefined if ECONNREFUSED. This will prevent exception being thrown.