{"action":"opened","issue":{"url":"https://api.github.com/repos/jpush/jpush-api-nodejs-client/issues/12","labels_url":"https://api.github.com/repos/jpush/jpush-api-nodejs-client/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/jpush/jpush-api-nodejs-client/issues/12/comments","events_url":"https://api.github.com/repos/jpush/jpush-api-nodejs-client/issues/12/events","html_url":"https://github.com/jpush/jpush-api-nodejs-client/issues/12","id":117778031,"number":12,"title":"为什么所有error都是直接throw的，可以考虑在链式调用末尾加上 .catch(err) 吗？","user":{"login":"plusmancn","id":4994682,"avatar_url":"https://avatars.githubusercontent.com/u/4994682?v=3","gravatar_id":"","url":"https://api.github.com/users/plusmancn","html_url":"https://github.com/plusmancn","followers_url":"https://api.github.com/users/plusmancn/followers","following_url":"https://api.github.com/users/plusmancn/following{/other_user}","gists_url":"https://api.github.com/users/plusmancn/gists{/gist_id}","starred_url":"https://api.github.com/users/plusmancn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plusmancn/subscriptions","organizations_url":"https://api.github.com/users/plusmancn/orgs","repos_url":"https://api.github.com/users/plusmancn/repos","events_url":"https://api.github.com/users/plusmancn/events{/privacy}","received_events_url":"https://api.github.com/users/plusmancn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-19T09:51:50Z","updated_at":"2015-11-19T09:51:50Z","closed_at":null,"body":"框架内部代码写得也有点啰嗦，比如 _request 最后发送请求，其实 request 库有method参数的，没必要用四个if，当然还有json参数，不能用eval，略危险。\r\n\r\n还有很多代码细节，感觉写得有点死板。\r\n\r\n最重要的是，错误处理机制，throw 用得太随意了。\r\n"}}