{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/go-autorest/pulls/comments/54453736","id":54453736,"diff_hunk":"@@ -0,0 +1,165 @@\n+package azure\n+\n+import (\n+\t\"fmt\"\n+\t\"net/http\"\n+\t\"time\"\n+\n+\t\"github.com/Azure/go-autorest/autorest\"\n+\t\"github.com/Azure/go-autorest/autorest/date\"\n+)\n+\n+const (\n+\t// HeaderAsyncOperation is the Azure header providing the URL from which to obtain the\n+\t// OperationResource for an asynchronous (aka long running) operation.\n+\tHeaderAsyncOperation = \"Azure-AsyncOperation\"\n+)\n+\n+const (\n+\t// OperationCanceled says the underlying operation was canceled.\n+\tOperationCanceled string = \"Canceled\"\n+\t// OperationFailed says the underlying operation failed.\n+\tOperationFailed string = \"Failed\"\n+\t// OperationSucceeded says the underlying opertion succeeded.\n+\tOperationSucceeded string = \"Succeeded\"\n+)\n+\n+// OperationError provides additional detail when an operation fails or is canceled.\n+type OperationError struct {\n+\t// Code provides an invariant error code useful for troubleshooting, aggregration, and analysis.\n+\tCode string `json:\"code,omitempty\"`\n+\t// Message indicates what error occurred and what can be done to address the issue.\n+\tMessage string `json:\"message,omitempty\"`\n+}\n+\n+// Error implements the error interface returnin a string containing the code and message.\n+func (oe OperationError) Error() string {\n+\treturn fmt.Sprintf(\"Azure Operation Error -- code(%v), message(%v)\", oe.Code, oe.Message)","path":"autorest/azure/async.go","position":37,"original_position":37,"commit_id":"224574262a470976145766c8ada04ac917292784","original_commit_id":"224574262a470976145766c8ada04ac917292784","user":{"login":"ahmetalpbalkan","id":159209,"avatar_url":"https://avatars.githubusercontent.com/u/159209?v=3","gravatar_id":"","url":"https://api.github.com/users/ahmetalpbalkan","html_url":"https://github.com/ahmetalpbalkan","followers_url":"https://api.github.com/users/ahmetalpbalkan/followers","following_url":"https://api.github.com/users/ahmetalpbalkan/following{/other_user}","gists_url":"https://api.github.com/users/ahmetalpbalkan/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmetalpbalkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmetalpbalkan/subscriptions","organizations_url":"https://api.github.com/users/ahmetalpbalkan/orgs","repos_url":"https://api.github.com/users/ahmetalpbalkan/repos","events_url":"https://api.github.com/users/ahmetalpbalkan/events{/privacy}","received_events_url":"https://api.github.com/users/ahmetalpbalkan/received_events","type":"User","site_admin":false},"body":"@brendandixon I've been seeing error message patterns emerging in docker repo. It's usually like:\r\n\r\n    package: Message field=%q..\r\n\r\n\r\n","created_at":"2016-02-29T18:29:58Z","updated_at":"2016-02-29T18:29:58Z","html_url":"https://github.com/Azure/go-autorest/pull/38#discussion_r54453736","pull_request_url":"https://api.github.com/repos/Azure/go-autorest/pulls/38","_links":{"self":{"href":"https://api.github.com/repos/Azure/go-autorest/pulls/comments/54453736"},"html":{"href":"https://github.com/Azure/go-autorest/pull/38#discussion_r54453736"},"pull_request":{"href":"https://api.github.com/repos/Azure/go-autorest/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/go-autorest/pulls/38","id":60911593,"html_url":"https://github.com/Azure/go-autorest/pull/38","diff_url":"https://github.com/Azure/go-autorest/pull/38.diff","patch_url":"https://github.com/Azure/go-autorest/pull/38.patch","issue_url":"https://api.github.com/repos/Azure/go-autorest/issues/38","number":38,"state":"open","locked":false,"title":"Reworked handling asynchronous and polled requests","user":{"login":"brendandixon","id":305205,"avatar_url":"https://avatars.githubusercontent.com/u/305205?v=3","gravatar_id":"","url":"https://api.github.com/users/brendandixon","html_url":"https://github.com/brendandixon","followers_url":"https://api.github.com/users/brendandixon/followers","following_url":"https://api.github.com/users/brendandixon/following{/other_user}","gists_url":"https://api.github.com/users/brendandixon/gists{/gist_id}","starred_url":"https://api.github.com/users/brendandixon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendandixon/subscriptions","organizations_url":"https://api.github.com/users/brendandixon/orgs","repos_url":"https://api.github.com/users/brendandixon/repos","events_url":"https://api.github.com/users/brendandixon/events{/privacy}","received_events_url":"https://api.github.com/users/brendandixon/received_events","type":"User","site_admin":false},"body":"This PR *significantly* changes how `go-autorest` handles polling. By using `SendDecorators` it can now address specific cases (such as handling Azure long-running operations).\r\n\r\nSigned-off-by: Brendan Dixon <brendand@microsoft.com>","created_at":"2016-02-26T22:06:22Z","updated_at":"2016-02-29T18:29:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"346deb89ec1ece5c4d7380f320d120e1866693fa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Azure/go-autorest/pulls/38/commits","review_comments_url":"https://api.github.com/repos/Azure/go-autorest/pulls/38/comments","review_comment_url":"https://api.github.com/repos/Azure/go-autorest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/go-autorest/issues/38/comments","statuses_url":"https://api.github.com/repos/Azure/go-autorest/statuses/224574262a470976145766c8ada04ac917292784","head":{"label":"brendandixon:master","ref":"master","sha":"224574262a470976145766c8ada04ac917292784","user":{"login":"brendandixon","id":305205,"avatar_url":"https://avatars.githubusercontent.com/u/305205?v=3","gravatar_id":"","url":"https://api.github.com/users/brendandixon","html_url":"https://github.com/brendandixon","followers_url":"https://api.github.com/users/brendandixon/followers","following_url":"https://api.github.com/users/brendandixon/following{/other_user}","gists_url":"https://api.github.com/users/brendandixon/gists{/gist_id}","starred_url":"https://api.github.com/users/brendandixon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendandixon/subscriptions","organizations_url":"https://api.github.com/users/brendandixon/orgs","repos_url":"https://api.github.com/users/brendandixon/repos","events_url":"https://api.github.com/users/brendandixon/events{/privacy}","received_events_url":"https://api.github.com/users/brendandixon/received_events","type":"User","site_admin":false},"repo":{"id":49985493,"name":"go-autorest","full_name":"brendandixon/go-autorest","owner":{"login":"brendandixon","id":305205,"avatar_url":"https://avatars.githubusercontent.com/u/305205?v=3","gravatar_id":"","url":"https://api.github.com/users/brendandixon","html_url":"https://github.com/brendandixon","followers_url":"https://api.github.com/users/brendandixon/followers","following_url":"https://api.github.com/users/brendandixon/following{/other_user}","gists_url":"https://api.github.com/users/brendandixon/gists{/gist_id}","starred_url":"https://api.github.com/users/brendandixon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendandixon/subscriptions","organizations_url":"https://api.github.com/users/brendandixon/orgs","repos_url":"https://api.github.com/users/brendandixon/repos","events_url":"https://api.github.com/users/brendandixon/events{/privacy}","received_events_url":"https://api.github.com/users/brendandixon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brendandixon/go-autorest","description":"This package implements an HTTP request pipeline suitable for use across multiple go-routines and provides the shared routines relied on by AutoRest (see https://github.com/Azure/autorest/) generated Go code.","fork":true,"url":"https://api.github.com/repos/brendandixon/go-autorest","forks_url":"https://api.github.com/repos/brendandixon/go-autorest/forks","keys_url":"https://api.github.com/repos/brendandixon/go-autorest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brendandixon/go-autorest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brendandixon/go-autorest/teams","hooks_url":"https://api.github.com/repos/brendandixon/go-autorest/hooks","issue_events_url":"https://api.github.com/repos/brendandixon/go-autorest/issues/events{/number}","events_url":"https://api.github.com/repos/brendandixon/go-autorest/events","assignees_url":"https://api.github.com/repos/brendandixon/go-autorest/assignees{/user}","branches_url":"https://api.github.com/repos/brendandixon/go-autorest/branches{/branch}","tags_url":"https://api.github.com/repos/brendandixon/go-autorest/tags","blobs_url":"https://api.github.com/repos/brendandixon/go-autorest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brendandixon/go-autorest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brendandixon/go-autorest/git/refs{/sha}","trees_url":"https://api.github.com/repos/brendandixon/go-autorest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brendandixon/go-autorest/statuses/{sha}","languages_url":"https://api.github.com/repos/brendandixon/go-autorest/languages","stargazers_url":"https://api.github.com/repos/brendandixon/go-autorest/stargazers","contributors_url":"https://api.github.com/repos/brendandixon/go-autorest/contributors","subscribers_url":"https://api.github.com/repos/brendandixon/go-autorest/subscribers","subscription_url":"https://api.github.com/repos/brendandixon/go-autorest/subscription","commits_url":"https://api.github.com/repos/brendandixon/go-autorest/commits{/sha}","git_commits_url":"https://api.github.com/repos/brendandixon/go-autorest/git/commits{/sha}","comments_url":"https://api.github.com/repos/brendandixon/go-autorest/comments{/number}","issue_comment_url":"https://api.github.com/repos/brendandixon/go-autorest/issues/comments{/number}","contents_url":"https://api.github.com/repos/brendandixon/go-autorest/contents/{+path}","compare_url":"https://api.github.com/repos/brendandixon/go-autorest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brendandixon/go-autorest/merges","archive_url":"https://api.github.com/repos/brendandixon/go-autorest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brendandixon/go-autorest/downloads","issues_url":"https://api.github.com/repos/brendandixon/go-autorest/issues{/number}","pulls_url":"https://api.github.com/repos/brendandixon/go-autorest/pulls{/number}","milestones_url":"https://api.github.com/repos/brendandixon/go-autorest/milestones{/number}","notifications_url":"https://api.github.com/repos/brendandixon/go-autorest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brendandixon/go-autorest/labels{/name}","releases_url":"https://api.github.com/repos/brendandixon/go-autorest/releases{/id}","deployments_url":"https://api.github.com/repos/brendandixon/go-autorest/deployments","created_at":"2016-01-19T21:48:58Z","updated_at":"2016-01-19T21:48:59Z","pushed_at":"2016-02-27T00:07:03Z","git_url":"git://github.com/brendandixon/go-autorest.git","ssh_url":"git@github.com:brendandixon/go-autorest.git","clone_url":"https://github.com/brendandixon/go-autorest.git","svn_url":"https://github.com/brendandixon/go-autorest","homepage":"","size":266,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Azure:master","ref":"master","sha":"bebca455f60b24bf6a2459e9e862ff42da86f5e0","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":39398382,"name":"go-autorest","full_name":"Azure/go-autorest","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/go-autorest","description":"This package implements an HTTP request pipeline suitable for use across multiple go-routines and provides the shared routines relied on by AutoRest (see https://github.com/Azure/autorest/) generated Go code.","fork":false,"url":"https://api.github.com/repos/Azure/go-autorest","forks_url":"https://api.github.com/repos/Azure/go-autorest/forks","keys_url":"https://api.github.com/repos/Azure/go-autorest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/go-autorest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/go-autorest/teams","hooks_url":"https://api.github.com/repos/Azure/go-autorest/hooks","issue_events_url":"https://api.github.com/repos/Azure/go-autorest/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/go-autorest/events","assignees_url":"https://api.github.com/repos/Azure/go-autorest/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/go-autorest/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/go-autorest/tags","blobs_url":"https://api.github.com/repos/Azure/go-autorest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/go-autorest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/go-autorest/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/go-autorest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/go-autorest/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/go-autorest/languages","stargazers_url":"https://api.github.com/repos/Azure/go-autorest/stargazers","contributors_url":"https://api.github.com/repos/Azure/go-autorest/contributors","subscribers_url":"https://api.github.com/repos/Azure/go-autorest/subscribers","subscription_url":"https://api.github.com/repos/Azure/go-autorest/subscription","commits_url":"https://api.github.com/repos/Azure/go-autorest/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/go-autorest/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/go-autorest/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/go-autorest/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/go-autorest/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/go-autorest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/go-autorest/merges","archive_url":"https://api.github.com/repos/Azure/go-autorest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/go-autorest/downloads","issues_url":"https://api.github.com/repos/Azure/go-autorest/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/go-autorest/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/go-autorest/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/go-autorest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/go-autorest/labels{/name}","releases_url":"https://api.github.com/repos/Azure/go-autorest/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/go-autorest/deployments","created_at":"2015-07-20T17:33:08Z","updated_at":"2016-02-28T20:09:14Z","pushed_at":"2016-02-27T00:07:03Z","git_url":"git://github.com/Azure/go-autorest.git","ssh_url":"git@github.com:Azure/go-autorest.git","clone_url":"https://github.com/Azure/go-autorest.git","svn_url":"https://github.com/Azure/go-autorest","homepage":"","size":251,"stargazers_count":16,"watchers_count":16,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":2,"forks":11,"open_issues":2,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/go-autorest/pulls/38"},"html":{"href":"https://github.com/Azure/go-autorest/pull/38"},"issue":{"href":"https://api.github.com/repos/Azure/go-autorest/issues/38"},"comments":{"href":"https://api.github.com/repos/Azure/go-autorest/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/go-autorest/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/go-autorest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/go-autorest/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/go-autorest/statuses/224574262a470976145766c8ada04ac917292784"}}}}