{"action":"created","issue":{"url":"https://api.github.com/repos/grpc/grpc/issues/7925","repository_url":"https://api.github.com/repos/grpc/grpc","labels_url":"https://api.github.com/repos/grpc/grpc/issues/7925/labels{/name}","comments_url":"https://api.github.com/repos/grpc/grpc/issues/7925/comments","events_url":"https://api.github.com/repos/grpc/grpc/issues/7925/events","html_url":"https://github.com/grpc/grpc/pull/7925","id":174024824,"number":7925,"title":"c#: throw RpcException for failed network sends instead of InvalidOperationException","user":{"login":"imiuka","id":975570,"avatar_url":"https://avatars.githubusercontent.com/u/975570?v=3","gravatar_id":"","url":"https://api.github.com/users/imiuka","html_url":"https://github.com/imiuka","followers_url":"https://api.github.com/users/imiuka/followers","following_url":"https://api.github.com/users/imiuka/following{/other_user}","gists_url":"https://api.github.com/users/imiuka/gists{/gist_id}","starred_url":"https://api.github.com/users/imiuka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imiuka/subscriptions","organizations_url":"https://api.github.com/users/imiuka/orgs","repos_url":"https://api.github.com/users/imiuka/repos","events_url":"https://api.github.com/users/imiuka/events{/privacy}","received_events_url":"https://api.github.com/users/imiuka/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/grpc/grpc/labels/cla:%20yes","name":"cla: yes","color":"009800"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-30T13:52:31Z","updated_at":"2016-08-30T13:59:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/grpc/grpc/pulls/7925","html_url":"https://github.com/grpc/grpc/pull/7925","diff_url":"https://github.com/grpc/grpc/pull/7925.diff","patch_url":"https://github.com/grpc/grpc/pull/7925.patch"},"body":"Currently, gRPC throws an `InvalidOperationException` when it's network sends fail. This communicates the wrong semantics (that you're doing something wrong), and also makes it difficult to handle error scenarios where we actually attempted an invalid operation (like reading trailers before trailers are available).\r\n\r\nBecause `InvalidOperationException` here communicates the wrong semantics, we can't be sure if an `InvalidOperationException` occurred because we performed an invalid operation, or because of a transient error, without testing for the string \"failed send\" or \"error sending status\" which makes for some messy error handling code. If we instead throw an `RpcException`, clients can easily know that the issue occurred within the RPC layer, rather than failing a contract on its part.\r\n\r\nThis pull request changes them to throw `RpcException`s with `UNKNOWN` status, but I'd also considered `INTERNAL`. I feel that unknown communicates the potential transient nature of communication errors better than internal does (where something is \"very broken\").\r\n\r\nHope this is reasonable, or you have a better solution. Thanks for your time!\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/grpc/grpc/issues/comments/243447521","html_url":"https://github.com/grpc/grpc/pull/7925#issuecomment-243447521","issue_url":"https://api.github.com/repos/grpc/grpc/issues/7925","id":243447521,"user":{"login":"imiuka","id":975570,"avatar_url":"https://avatars.githubusercontent.com/u/975570?v=3","gravatar_id":"","url":"https://api.github.com/users/imiuka","html_url":"https://github.com/imiuka","followers_url":"https://api.github.com/users/imiuka/followers","following_url":"https://api.github.com/users/imiuka/following{/other_user}","gists_url":"https://api.github.com/users/imiuka/gists{/gist_id}","starred_url":"https://api.github.com/users/imiuka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imiuka/subscriptions","organizations_url":"https://api.github.com/users/imiuka/orgs","repos_url":"https://api.github.com/users/imiuka/repos","events_url":"https://api.github.com/users/imiuka/events{/privacy}","received_events_url":"https://api.github.com/users/imiuka/received_events","type":"User","site_admin":false},"created_at":"2016-08-30T13:59:04Z","updated_at":"2016-08-30T13:59:04Z","body":"Sorry, should have done this earlier, looked around and found these similar issues:\r\n\r\n#7223 discusses the same issue and suggests a similar change\r\n#7861 considered wrapping generic errors in a `GrpcOperationFailedException`"}}
{"actor":{"display_login":"imiuka"}}