{"action":"opened","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-js/issues/1277","repository_url":"https://api.github.com/repos/swagger-api/swagger-js","labels_url":"https://api.github.com/repos/swagger-api/swagger-js/issues/1277/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-js/issues/1277/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-js/issues/1277/events","html_url":"https://github.com/swagger-api/swagger-js/issues/1277","id":312178216,"number":1277,"title":"HTTP error handling regression from 3.5.2 to 3.6.0","user":{"login":"kevinoid","id":336433,"avatar_url":"https://avatars3.githubusercontent.com/u/336433?v=4","gravatar_id":"","url":"https://api.github.com/users/kevinoid","html_url":"https://github.com/kevinoid","followers_url":"https://api.github.com/users/kevinoid/followers","following_url":"https://api.github.com/users/kevinoid/following{/other_user}","gists_url":"https://api.github.com/users/kevinoid/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinoid/subscriptions","organizations_url":"https://api.github.com/users/kevinoid/orgs","repos_url":"https://api.github.com/users/kevinoid/repos","events_url":"https://api.github.com/users/kevinoid/events{/privacy}","received_events_url":"https://api.github.com/users/kevinoid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-07T06:59:37Z","updated_at":"2018-04-07T06:59:37Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"With `swagger-client@3.6.0` if a transport-level HTTP error occurs (e.g. host/port unreachable) it causes an internal error in `swagger-client` which suppresses the original HTTP error.  The problem can be demonstrated with the following command:\r\n\r\n```\r\nnode -e \"require('swagger-client').http({url: 'http://localhost:1/'}).catch(console.error)\"\r\n```\r\nWith `swagger-client@3.6.0` this will print `TypeError: Cannot read property 'statusText' of undefined` along with a stack trace.  This is far less useful than the error produced by `swagger-client@3.5.2`, `FetchError: request to http://localhost:1/ failed, reason: connect ECONNREFUSED 127.0.0.1:1`.\r\n\r\nI bisected the regression to commit 1e9f8f06 from #1261.\r\n\r\nThanks,\r\nKevin"}}
{"actor":{"display_login":"kevinoid"}}