{"action":"created","issue":{"url":"https://api.github.com/repos/docker/swarmkit/issues/1685","repository_url":"https://api.github.com/repos/docker/swarmkit","labels_url":"https://api.github.com/repos/docker/swarmkit/issues/1685/labels{/name}","comments_url":"https://api.github.com/repos/docker/swarmkit/issues/1685/comments","events_url":"https://api.github.com/repos/docker/swarmkit/issues/1685/events","html_url":"https://github.com/docker/swarmkit/issues/1685","id":184921802,"number":1685,"title":"Incorrect Error handling in UpdateService","user":{"login":"thaJeztah","id":1804568,"avatar_url":"https://avatars.githubusercontent.com/u/1804568?v=3","gravatar_id":"","url":"https://api.github.com/users/thaJeztah","html_url":"https://github.com/thaJeztah","followers_url":"https://api.github.com/users/thaJeztah/followers","following_url":"https://api.github.com/users/thaJeztah/following{/other_user}","gists_url":"https://api.github.com/users/thaJeztah/gists{/gist_id}","starred_url":"https://api.github.com/users/thaJeztah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaJeztah/subscriptions","organizations_url":"https://api.github.com/users/thaJeztah/orgs","repos_url":"https://api.github.com/users/thaJeztah/repos","events_url":"https://api.github.com/users/thaJeztah/events{/privacy}","received_events_url":"https://api.github.com/users/thaJeztah/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-24T18:42:58Z","updated_at":"2016-10-24T18:56:29Z","closed_at":null,"body":"Just a blurb so that we don't forget:\r\n\r\n[UpdateService](https://github.com/docker/swarmkit/blob/5b369e3f789266de72d880feccaa9ac753ebf075/manager/controlapi/service.go#L368) does not return proper gRPC errors for some errors. Also, no error is returned if a service cannot be found.\r\n\r\nWe should fix those to prevent more errors being added in an incorrect way\r\n\r\n/cc @stevvooe "},"comment":{"url":"https://api.github.com/repos/docker/swarmkit/issues/comments/255832310","html_url":"https://github.com/docker/swarmkit/issues/1685#issuecomment-255832310","issue_url":"https://api.github.com/repos/docker/swarmkit/issues/1685","id":255832310,"user":{"login":"aaronlehmann","id":10601430,"avatar_url":"https://avatars.githubusercontent.com/u/10601430?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronlehmann","html_url":"https://github.com/aaronlehmann","followers_url":"https://api.github.com/users/aaronlehmann/followers","following_url":"https://api.github.com/users/aaronlehmann/following{/other_user}","gists_url":"https://api.github.com/users/aaronlehmann/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronlehmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronlehmann/subscriptions","organizations_url":"https://api.github.com/users/aaronlehmann/orgs","repos_url":"https://api.github.com/users/aaronlehmann/repos","events_url":"https://api.github.com/users/aaronlehmann/events{/privacy}","received_events_url":"https://api.github.com/users/aaronlehmann/received_events","type":"User","site_admin":false},"created_at":"2016-10-24T18:56:29Z","updated_at":"2016-10-24T18:56:29Z","body":"> @aaronlehmann What about this line? https://github.com/docker/swarmkit/blob/5b369e3f789266de72d880feccaa9ac753ebf075/manager/controlapi/service.go#L395\r\n\r\nThat's in a closure. After the closure, there's this check:\r\n\r\n```go\r\n\tif service == nil {\r\n\t\treturn nil, grpc.Errorf(codes.NotFound, \"service %s not found\", request.ServiceID)\r\n\t}\r\n```\r\n\r\nI agree about the inconsistent use of gRPC error codes, though."}}
{"actor":{"display_login":"aaronlehmann"}}