rest-gen JavaScript: Some request errors such as ECONNREFUSED means message is undefined