{"action":"closed","issue":{"url":"https://api.github.com/repos/n0mad01/node.bittrex.api/issues/31","repository_url":"https://api.github.com/repos/n0mad01/node.bittrex.api","labels_url":"https://api.github.com/repos/n0mad01/node.bittrex.api/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/n0mad01/node.bittrex.api/issues/31/comments","events_url":"https://api.github.com/repos/n0mad01/node.bittrex.api/issues/31/events","html_url":"https://github.com/n0mad01/node.bittrex.api/issues/31","id":245706246,"number":31,"title":"Questions: How to correctly handle errors","user":{"login":"groentebroer","id":1811817,"avatar_url":"https://avatars0.githubusercontent.com/u/1811817?v=4","gravatar_id":"","url":"https://api.github.com/users/groentebroer","html_url":"https://github.com/groentebroer","followers_url":"https://api.github.com/users/groentebroer/followers","following_url":"https://api.github.com/users/groentebroer/following{/other_user}","gists_url":"https://api.github.com/users/groentebroer/gists{/gist_id}","starred_url":"https://api.github.com/users/groentebroer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/groentebroer/subscriptions","organizations_url":"https://api.github.com/users/groentebroer/orgs","repos_url":"https://api.github.com/users/groentebroer/repos","events_url":"https://api.github.com/users/groentebroer/events{/privacy}","received_events_url":"https://api.github.com/users/groentebroer/received_events","type":"User","site_admin":false},"labels":[{"id":113726637,"url":"https://api.github.com/repos/n0mad01/node.bittrex.api/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":113726638,"url":"https://api.github.com/repos/n0mad01/node.bittrex.api/labels/help%20wanted","name":"help wanted","color":"159818","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-07-26T12:30:20Z","updated_at":"2017-07-30T18:39:12Z","closed_at":"2017-07-30T18:39:12Z","body":"Hi,\r\n\r\nI am trying to implement your module, which speeds things up greatly!\r\n\r\nWhat I am trying to solve is to correctly handle errors when it might occur.\r\nTwo scenario's I can think of:\r\n\r\n1. HTTP errors (timeout, HTTP 500, 403, etc.)\r\n2. Json errors (success: false)\r\n\r\nLooking at the code and samples, it is not clear to me how the codes responds on those errors, or is this not part of the implementation yet?\r\n\r\nMost frameworks I know work, with the \"err\" param being the first result on the callback, but this not seem to be implemented here.\r\n\r\nCan you give an error handling example?\r\nFor example on:\r\n \r\n`bittrex.getbalance({ currency : 'BTC' }, function( data ) {\r\n  console.log( data );\r\n});`\r\n\r\nIf not implemented yet, is it somewhere on the roadmap (soon)?\r\nBased on that, some retry mecanism may be build inside this module of on top of this to for example retry a buy or sell if an error occurs."}}
{"actor":{"display_login":"n0mad01"}}