{"action":"created","issue":{"url":"https://api.github.com/repos/simolus3/web3dart/issues/24","repository_url":"https://api.github.com/repos/simolus3/web3dart","labels_url":"https://api.github.com/repos/simolus3/web3dart/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/simolus3/web3dart/issues/24/comments","events_url":"https://api.github.com/repos/simolus3/web3dart/issues/24/events","html_url":"https://github.com/simolus3/web3dart/issues/24","id":390212591,"node_id":"MDU6SXNzdWUzOTAyMTI1OTE=","number":24,"title":"Should we call _makeRPCCall with await?","user":{"login":"xiaoch05","id":15799431,"node_id":"MDQ6VXNlcjE1Nzk5NDMx","avatar_url":"https://avatars1.githubusercontent.com/u/15799431?v=4","gravatar_id":"","url":"https://api.github.com/users/xiaoch05","html_url":"https://github.com/xiaoch05","followers_url":"https://api.github.com/users/xiaoch05/followers","following_url":"https://api.github.com/users/xiaoch05/following{/other_user}","gists_url":"https://api.github.com/users/xiaoch05/gists{/gist_id}","starred_url":"https://api.github.com/users/xiaoch05/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiaoch05/subscriptions","organizations_url":"https://api.github.com/users/xiaoch05/orgs","repos_url":"https://api.github.com/users/xiaoch05/repos","events_url":"https://api.github.com/users/xiaoch05/events{/privacy}","received_events_url":"https://api.github.com/users/xiaoch05/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-12T12:52:25Z","updated_at":"2018-12-12T16:31:34Z","closed_at":null,"author_association":"NONE","body":"https://github.com/simolus3/web3dart/blob/a0968df6745214601409e49a261711b778b3e027/lib/src/web3client.dart#L184\r\n\r\nfunction sendRawTransaction call _makeRPCCall without **await**, and then cannot catch the exception thrown by _makeRPCCall. The exception can't be transfered to the caller."},"comment":{"url":"https://api.github.com/repos/simolus3/web3dart/issues/comments/446652016","html_url":"https://github.com/simolus3/web3dart/issues/24#issuecomment-446652016","issue_url":"https://api.github.com/repos/simolus3/web3dart/issues/24","id":446652016,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NjY1MjAxNg==","user":{"login":"simolus3","id":5738860,"node_id":"MDQ6VXNlcjU3Mzg4NjA=","avatar_url":"https://avatars2.githubusercontent.com/u/5738860?v=4","gravatar_id":"","url":"https://api.github.com/users/simolus3","html_url":"https://github.com/simolus3","followers_url":"https://api.github.com/users/simolus3/followers","following_url":"https://api.github.com/users/simolus3/following{/other_user}","gists_url":"https://api.github.com/users/simolus3/gists{/gist_id}","starred_url":"https://api.github.com/users/simolus3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simolus3/subscriptions","organizations_url":"https://api.github.com/users/simolus3/orgs","repos_url":"https://api.github.com/users/simolus3/repos","events_url":"https://api.github.com/users/simolus3/events{/privacy}","received_events_url":"https://api.github.com/users/simolus3/received_events","type":"User","site_admin":false},"created_at":"2018-12-12T16:31:34Z","updated_at":"2018-12-12T16:31:34Z","author_association":"OWNER","body":"Sorry, can you please clarify the issue?\r\nCurrently, when there's an error in `_makeRPCCall`, the `sendRawTransaction` call will throw the same error (see [here](https://api.dartlang.org/stable/2.1.0/dart-async/Future/then.html)\r\n>If onError is not given, and this future completes with an error, the error is forwarded directly to the returned future.\r\n\r\nThus, the caller of `sendRawTransaction` will receive the error. I think this is alright because this library is not responsible for any IO error and we should inform the caller when something went wrong.\r\nWe could achieve the same behavior with `await`, but I don't really see a benefit when we're just returning one `Future` mapped with `then`, the code won't become substantially more simple."}}
{"actor":{"display_login":"simolus3"}}