{"action":"closed","issue":{"url":"https://api.github.com/repos/sphereio/sphere-node-sdk/issues/136","repository_url":"https://api.github.com/repos/sphereio/sphere-node-sdk","labels_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/issues/136/labels{/name}","comments_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/issues/136/comments","events_url":"https://api.github.com/repos/sphereio/sphere-node-sdk/issues/136/events","html_url":"https://github.com/sphereio/sphere-node-sdk/issues/136","id":161153552,"number":136,"title":"Handle properly ETIMEDOUT error","user":{"login":"lojzatran","id":803826,"avatar_url":"https://avatars.githubusercontent.com/u/803826?v=3","gravatar_id":"","url":"https://api.github.com/users/lojzatran","html_url":"https://github.com/lojzatran","followers_url":"https://api.github.com/users/lojzatran/followers","following_url":"https://api.github.com/users/lojzatran/following{/other_user}","gists_url":"https://api.github.com/users/lojzatran/gists{/gist_id}","starred_url":"https://api.github.com/users/lojzatran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lojzatran/subscriptions","organizations_url":"https://api.github.com/users/lojzatran/orgs","repos_url":"https://api.github.com/users/lojzatran/repos","events_url":"https://api.github.com/users/lojzatran/events{/privacy}","received_events_url":"https://api.github.com/users/lojzatran/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-06-20T09:30:38Z","updated_at":"2016-09-02T11:01:43Z","closed_at":"2016-09-02T11:01:43Z","body":"### Expected behavior\r\nSDK should handle properly the case of ETIMEDOUT and should not fail the whole process.\r\n\r\n### Actual behavior\r\nTypeError is thrown and the whole process fails:\r\n```\r\nsphere-connect:rest error on request: {\"code\":\"ETIMEDOUT\",\"errno\":\"ETIMEDOUT\",\"syscall\":\"connect\",\"address\":\"5.79.36.218\",\"port\":443} +15s\r\nUnhandled exception. Please handle!\r\nTypeError: Cannot read property 'request' of undefined\r\n    at InventoryEntryService.BaseService._wrapResponse (/Users/user/Projects/my-project-cli/node_modules/sphere-stock-import/node_modules/sphere-node-sdk/lib/services/base.js:378:27)\r\n    at /Users/user/Projects/my-project-cli/node_modules/sphere-stock-import/node_modules/sphere-node-sdk/lib/services/base.js:331:40\r\n    at /Users/user/Projects/my-project-cli/node_modules/sphere-stock-import/node_modules/sphere-node-sdk/lib/connect/rest.js:201:20\r\n    at Request._callback (/Users/user/Projects/my-project-cli/node_modules/sphere-stock-import/node_modules/sphere-node-sdk/lib/connect/rest.js:159:14)\r\n    at self.callback (/Users/user/Projects/my-project-cli/node_modules/sphere-stock-import/node_modules/sphere-node-sdk/node_modules/request/request.js:360:22)\r\n    at emitOne (events.js:77:13)\r\n    at Request.emit (events.js:169:7)\r\n    at Request.onRequestError (/Users/user/Projects/my-project-cli/node_modules/sphere-stock-import/node_modules/sphere-node-sdk/node_modules/request/request.js:1008:8)\r\n    at emitOne (events.js:77:13)\r\n    at ClientRequest.emit (events.js:169:7)\r\n    at TLSSocket.socketErrorListener (_http_client.js:259:9)\r\n    at emitOne (events.js:77:13)\r\n    at TLSSocket.emit (events.js:169:7)\r\n    at emitErrorNT (net.js:1250:8)\r\n    at doNTCallback2 (node.js:429:9)\r\n    at process._tickCallback (node.js:343:17)\r\nUnhandled exception. Please handle!\r\nTypeError: Cannot read property 'request' of undefined\r\n    at InventoryEntryService.BaseService._wrapResponse (/Users/user/Projects/my-project-cli/node_modules/sphere-stock-import/node_modules/sphere-node-sdk/lib/services/base.js:378:27)\r\n    at /Users/user/Projects/my-project-cli/node_modules/sphere-stock-import/node_modules/sphere-node-sdk/lib/services/base.js:331:40\r\n    at /Users/user/Projects/my-project-cli/node_modules/sphere-stock-import/node_modules/sphere-node-sdk/lib/connect/rest.js:201:20\r\n    at Request._callback (/Users/user/Projects/my-project-cli/node_modules/sphere-stock-import/node_modules/sphere-node-sdk/lib/connect/rest.js:159:14)\r\n    at self.callback (/Users/user/Projects/my-project-cli/node_modules/sphere-stock-import/node_modules/sphere-node-sdk/node_modules/request/request.js:360:22)\r\n    at emitOne (events.js:77:13)\r\n    at Request.emit (events.js:169:7)\r\n    at Request.onRequestError (/Users/user/Projects/my-project-cli/node_modules/sphere-stock-import/node_modules/sphere-node-sdk/node_modules/request/request.js:1008:8)\r\n    at emitOne (events.js:77:13)\r\n    at ClientRequest.emit (events.js:169:7)\r\n    at TLSSocket.socketErrorListener (_http_client.js:259:9)\r\n    at emitOne (events.js:77:13)\r\n    at TLSSocket.emit (events.js:169:7)\r\n    at emitErrorNT (net.js:1250:8)\r\n    at doNTCallback2 (node.js:429:9)\r\n    at process._tickCallback (node.js:343:17)\r\n```"}}
{"actor":{"display_login":"emmenko"}}