{"action":"created","issue":{"url":"https://api.github.com/repos/grpc/grpc-go/issues/687","repository_url":"https://api.github.com/repos/grpc/grpc-go","labels_url":"https://api.github.com/repos/grpc/grpc-go/issues/687/labels{/name}","comments_url":"https://api.github.com/repos/grpc/grpc-go/issues/687/comments","events_url":"https://api.github.com/repos/grpc/grpc-go/issues/687/events","html_url":"https://github.com/grpc/grpc-go/pull/687","id":155326245,"number":687,"title":"Make RpcError exported","user":{"login":"dotdoom","id":561122,"avatar_url":"https://avatars.githubusercontent.com/u/561122?v=3","gravatar_id":"","url":"https://api.github.com/users/dotdoom","html_url":"https://github.com/dotdoom","followers_url":"https://api.github.com/users/dotdoom/followers","following_url":"https://api.github.com/users/dotdoom/following{/other_user}","gists_url":"https://api.github.com/users/dotdoom/gists{/gist_id}","starred_url":"https://api.github.com/users/dotdoom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotdoom/subscriptions","organizations_url":"https://api.github.com/users/dotdoom/orgs","repos_url":"https://api.github.com/users/dotdoom/repos","events_url":"https://api.github.com/users/dotdoom/events{/privacy}","received_events_url":"https://api.github.com/users/dotdoom/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-05-17T18:16:18Z","updated_at":"2016-05-17T18:52:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/grpc/grpc-go/pulls/687","html_url":"https://github.com/grpc/grpc-go/pull/687","diff_url":"https://github.com/grpc/grpc-go/pull/687.diff","patch_url":"https://github.com/grpc/grpc-go/pull/687.patch"},"body":"To allow RPC handlers returning meaningful standard GRPC status codes,\r\nsuch as UNAVAILABLE etc, instead of relying on non-exported mapping\r\nfunction convertCode."},"comment":{"url":"https://api.github.com/repos/grpc/grpc-go/issues/comments/219816993","html_url":"https://github.com/grpc/grpc-go/pull/687#issuecomment-219816993","issue_url":"https://api.github.com/repos/grpc/grpc-go/issues/687","id":219816993,"user":{"login":"iamqizhao","id":10121772,"avatar_url":"https://avatars.githubusercontent.com/u/10121772?v=3","gravatar_id":"","url":"https://api.github.com/users/iamqizhao","html_url":"https://github.com/iamqizhao","followers_url":"https://api.github.com/users/iamqizhao/followers","following_url":"https://api.github.com/users/iamqizhao/following{/other_user}","gists_url":"https://api.github.com/users/iamqizhao/gists{/gist_id}","starred_url":"https://api.github.com/users/iamqizhao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamqizhao/subscriptions","organizations_url":"https://api.github.com/users/iamqizhao/orgs","repos_url":"https://api.github.com/users/iamqizhao/repos","events_url":"https://api.github.com/users/iamqizhao/events{/privacy}","received_events_url":"https://api.github.com/users/iamqizhao/received_events","type":"User","site_admin":false},"created_at":"2016-05-17T18:52:06Z","updated_at":"2016-05-17T18:52:06Z","body":"Isn't the following working?\r\n\r\nreply, err := foo.bar(ctx, &req)\r\nif err != nil {\r\n  if grpc.Code(err) ==  codes.Unavailable {\r\n    ...\r\n  }\r\n}\r\n..."}}