{"action":"opened","number":447,"pull_request":{"url":"https://api.github.com/repos/squaremo/amqp.node/pulls/447","id":204852164,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0ODUyMTY0","html_url":"https://github.com/squaremo/amqp.node/pull/447","diff_url":"https://github.com/squaremo/amqp.node/pull/447.diff","patch_url":"https://github.com/squaremo/amqp.node/pull/447.patch","issue_url":"https://api.github.com/repos/squaremo/amqp.node/issues/447","number":447,"state":"open","locked":false,"title":"Add method and class IDs to channel errors","user":{"login":"MitMaro","id":177427,"node_id":"MDQ6VXNlcjE3NzQyNw==","avatar_url":"https://avatars1.githubusercontent.com/u/177427?v=4","gravatar_id":"","url":"https://api.github.com/users/MitMaro","html_url":"https://github.com/MitMaro","followers_url":"https://api.github.com/users/MitMaro/followers","following_url":"https://api.github.com/users/MitMaro/following{/other_user}","gists_url":"https://api.github.com/users/MitMaro/gists{/gist_id}","starred_url":"https://api.github.com/users/MitMaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MitMaro/subscriptions","organizations_url":"https://api.github.com/users/MitMaro/orgs","repos_url":"https://api.github.com/users/MitMaro/repos","events_url":"https://api.github.com/users/MitMaro/events{/privacy}","received_events_url":"https://api.github.com/users/MitMaro/received_events","type":"User","site_admin":false},"body":"## What\r\n\r\nThis change adds a `methodId` and `classId` property to the channel errors.\r\n\r\n## Motivation\r\n\r\nI have a higher level configuration for the topology that allows automatic deletion of exchanges and queues. I perform a `deleteExchange`/`deleteQueue` with `ifUnused`/`ifEmpty` options set, and against exchanges and queues that no longer exist. These operations will fail with an error in some cases. Currently it is only  possible to determine if there was a `precondition­failed` error code (406) and not what operation failed. In the case of bad topology, for example a binding to a queue that does not exist, I produces a critical error fault in our monitoring system. In the case of a failure to delete an exchange or queue, I want to ignore the error, but currently cannot. With this change, errors will contain the class and method IDs, so that the source and type of error can be determined.\r\n\r\n## Notes\r\n\r\n* I've updated the existing tests to add checks for the class and method IDs where there was already an existing `error.code` check. I'm unsure on how or where to add any additional tests that may be needed.","created_at":"2018-07-30T15:59:13Z","updated_at":"2018-07-30T15:59:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/squaremo/amqp.node/pulls/447/commits","review_comments_url":"https://api.github.com/repos/squaremo/amqp.node/pulls/447/comments","review_comment_url":"https://api.github.com/repos/squaremo/amqp.node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/squaremo/amqp.node/issues/447/comments","statuses_url":"https://api.github.com/repos/squaremo/amqp.node/statuses/7830c371dfc5a5899c13b2b79a805a13c1377118","head":{"label":"MitMaro:add-class-method-id-to-error","ref":"add-class-method-id-to-error","sha":"7830c371dfc5a5899c13b2b79a805a13c1377118","user":{"login":"MitMaro","id":177427,"node_id":"MDQ6VXNlcjE3NzQyNw==","avatar_url":"https://avatars1.githubusercontent.com/u/177427?v=4","gravatar_id":"","url":"https://api.github.com/users/MitMaro","html_url":"https://github.com/MitMaro","followers_url":"https://api.github.com/users/MitMaro/followers","following_url":"https://api.github.com/users/MitMaro/following{/other_user}","gists_url":"https://api.github.com/users/MitMaro/gists{/gist_id}","starred_url":"https://api.github.com/users/MitMaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MitMaro/subscriptions","organizations_url":"https://api.github.com/users/MitMaro/orgs","repos_url":"https://api.github.com/users/MitMaro/repos","events_url":"https://api.github.com/users/MitMaro/events{/privacy}","received_events_url":"https://api.github.com/users/MitMaro/received_events","type":"User","site_admin":false},"repo":{"id":142571320,"node_id":"MDEwOlJlcG9zaXRvcnkxNDI1NzEzMjA=","name":"amqp.node","full_name":"MitMaro/amqp.node","owner":{"login":"MitMaro","id":177427,"node_id":"MDQ6VXNlcjE3NzQyNw==","avatar_url":"https://avatars1.githubusercontent.com/u/177427?v=4","gravatar_id":"","url":"https://api.github.com/users/MitMaro","html_url":"https://github.com/MitMaro","followers_url":"https://api.github.com/users/MitMaro/followers","following_url":"https://api.github.com/users/MitMaro/following{/other_user}","gists_url":"https://api.github.com/users/MitMaro/gists{/gist_id}","starred_url":"https://api.github.com/users/MitMaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MitMaro/subscriptions","organizations_url":"https://api.github.com/users/MitMaro/orgs","repos_url":"https://api.github.com/users/MitMaro/repos","events_url":"https://api.github.com/users/MitMaro/events{/privacy}","received_events_url":"https://api.github.com/users/MitMaro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MitMaro/amqp.node","description":"AMQP 0-9-1 library and client for Node.JS","fork":true,"url":"https://api.github.com/repos/MitMaro/amqp.node","forks_url":"https://api.github.com/repos/MitMaro/amqp.node/forks","keys_url":"https://api.github.com/repos/MitMaro/amqp.node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MitMaro/amqp.node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MitMaro/amqp.node/teams","hooks_url":"https://api.github.com/repos/MitMaro/amqp.node/hooks","issue_events_url":"https://api.github.com/repos/MitMaro/amqp.node/issues/events{/number}","events_url":"https://api.github.com/repos/MitMaro/amqp.node/events","assignees_url":"https://api.github.com/repos/MitMaro/amqp.node/assignees{/user}","branches_url":"https://api.github.com/repos/MitMaro/amqp.node/branches{/branch}","tags_url":"https://api.github.com/repos/MitMaro/amqp.node/tags","blobs_url":"https://api.github.com/repos/MitMaro/amqp.node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MitMaro/amqp.node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MitMaro/amqp.node/git/refs{/sha}","trees_url":"https://api.github.com/repos/MitMaro/amqp.node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MitMaro/amqp.node/statuses/{sha}","languages_url":"https://api.github.com/repos/MitMaro/amqp.node/languages","stargazers_url":"https://api.github.com/repos/MitMaro/amqp.node/stargazers","contributors_url":"https://api.github.com/repos/MitMaro/amqp.node/contributors","subscribers_url":"https://api.github.com/repos/MitMaro/amqp.node/subscribers","subscription_url":"https://api.github.com/repos/MitMaro/amqp.node/subscription","commits_url":"https://api.github.com/repos/MitMaro/amqp.node/commits{/sha}","git_commits_url":"https://api.github.com/repos/MitMaro/amqp.node/git/commits{/sha}","comments_url":"https://api.github.com/repos/MitMaro/amqp.node/comments{/number}","issue_comment_url":"https://api.github.com/repos/MitMaro/amqp.node/issues/comments{/number}","contents_url":"https://api.github.com/repos/MitMaro/amqp.node/contents/{+path}","compare_url":"https://api.github.com/repos/MitMaro/amqp.node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MitMaro/amqp.node/merges","archive_url":"https://api.github.com/repos/MitMaro/amqp.node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MitMaro/amqp.node/downloads","issues_url":"https://api.github.com/repos/MitMaro/amqp.node/issues{/number}","pulls_url":"https://api.github.com/repos/MitMaro/amqp.node/pulls{/number}","milestones_url":"https://api.github.com/repos/MitMaro/amqp.node/milestones{/number}","notifications_url":"https://api.github.com/repos/MitMaro/amqp.node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MitMaro/amqp.node/labels{/name}","releases_url":"https://api.github.com/repos/MitMaro/amqp.node/releases{/id}","deployments_url":"https://api.github.com/repos/MitMaro/amqp.node/deployments","created_at":"2018-07-27T11:55:48Z","updated_at":"2018-07-27T11:55:50Z","pushed_at":"2018-07-30T15:41:41Z","git_url":"git://github.com/MitMaro/amqp.node.git","ssh_url":"git@github.com:MitMaro/amqp.node.git","clone_url":"https://github.com/MitMaro/amqp.node.git","svn_url":"https://github.com/MitMaro/amqp.node","homepage":"https://squaremo.github.io/amqp.node/","size":708,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"squaremo:master","ref":"master","sha":"cdc8d339b183ba784fe7a5944ae4783dd149fbb0","user":{"login":"squaremo","id":62033,"node_id":"MDQ6VXNlcjYyMDMz","avatar_url":"https://avatars3.githubusercontent.com/u/62033?v=4","gravatar_id":"","url":"https://api.github.com/users/squaremo","html_url":"https://github.com/squaremo","followers_url":"https://api.github.com/users/squaremo/followers","following_url":"https://api.github.com/users/squaremo/following{/other_user}","gists_url":"https://api.github.com/users/squaremo/gists{/gist_id}","starred_url":"https://api.github.com/users/squaremo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squaremo/subscriptions","organizations_url":"https://api.github.com/users/squaremo/orgs","repos_url":"https://api.github.com/users/squaremo/repos","events_url":"https://api.github.com/users/squaremo/events{/privacy}","received_events_url":"https://api.github.com/users/squaremo/received_events","type":"User","site_admin":false},"repo":{"id":10634962,"node_id":"MDEwOlJlcG9zaXRvcnkxMDYzNDk2Mg==","name":"amqp.node","full_name":"squaremo/amqp.node","owner":{"login":"squaremo","id":62033,"node_id":"MDQ6VXNlcjYyMDMz","avatar_url":"https://avatars3.githubusercontent.com/u/62033?v=4","gravatar_id":"","url":"https://api.github.com/users/squaremo","html_url":"https://github.com/squaremo","followers_url":"https://api.github.com/users/squaremo/followers","following_url":"https://api.github.com/users/squaremo/following{/other_user}","gists_url":"https://api.github.com/users/squaremo/gists{/gist_id}","starred_url":"https://api.github.com/users/squaremo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squaremo/subscriptions","organizations_url":"https://api.github.com/users/squaremo/orgs","repos_url":"https://api.github.com/users/squaremo/repos","events_url":"https://api.github.com/users/squaremo/events{/privacy}","received_events_url":"https://api.github.com/users/squaremo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/squaremo/amqp.node","description":"AMQP 0-9-1 library and client for Node.JS","fork":false,"url":"https://api.github.com/repos/squaremo/amqp.node","forks_url":"https://api.github.com/repos/squaremo/amqp.node/forks","keys_url":"https://api.github.com/repos/squaremo/amqp.node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/squaremo/amqp.node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/squaremo/amqp.node/teams","hooks_url":"https://api.github.com/repos/squaremo/amqp.node/hooks","issue_events_url":"https://api.github.com/repos/squaremo/amqp.node/issues/events{/number}","events_url":"https://api.github.com/repos/squaremo/amqp.node/events","assignees_url":"https://api.github.com/repos/squaremo/amqp.node/assignees{/user}","branches_url":"https://api.github.com/repos/squaremo/amqp.node/branches{/branch}","tags_url":"https://api.github.com/repos/squaremo/amqp.node/tags","blobs_url":"https://api.github.com/repos/squaremo/amqp.node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/squaremo/amqp.node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/squaremo/amqp.node/git/refs{/sha}","trees_url":"https://api.github.com/repos/squaremo/amqp.node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/squaremo/amqp.node/statuses/{sha}","languages_url":"https://api.github.com/repos/squaremo/amqp.node/languages","stargazers_url":"https://api.github.com/repos/squaremo/amqp.node/stargazers","contributors_url":"https://api.github.com/repos/squaremo/amqp.node/contributors","subscribers_url":"https://api.github.com/repos/squaremo/amqp.node/subscribers","subscription_url":"https://api.github.com/repos/squaremo/amqp.node/subscription","commits_url":"https://api.github.com/repos/squaremo/amqp.node/commits{/sha}","git_commits_url":"https://api.github.com/repos/squaremo/amqp.node/git/commits{/sha}","comments_url":"https://api.github.com/repos/squaremo/amqp.node/comments{/number}","issue_comment_url":"https://api.github.com/repos/squaremo/amqp.node/issues/comments{/number}","contents_url":"https://api.github.com/repos/squaremo/amqp.node/contents/{+path}","compare_url":"https://api.github.com/repos/squaremo/amqp.node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/squaremo/amqp.node/merges","archive_url":"https://api.github.com/repos/squaremo/amqp.node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/squaremo/amqp.node/downloads","issues_url":"https://api.github.com/repos/squaremo/amqp.node/issues{/number}","pulls_url":"https://api.github.com/repos/squaremo/amqp.node/pulls{/number}","milestones_url":"https://api.github.com/repos/squaremo/amqp.node/milestones{/number}","notifications_url":"https://api.github.com/repos/squaremo/amqp.node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/squaremo/amqp.node/labels{/name}","releases_url":"https://api.github.com/repos/squaremo/amqp.node/releases{/id}","deployments_url":"https://api.github.com/repos/squaremo/amqp.node/deployments","created_at":"2013-06-12T02:29:36Z","updated_at":"2018-07-30T15:10:42Z","pushed_at":"2018-07-16T21:25:16Z","git_url":"git://github.com/squaremo/amqp.node.git","ssh_url":"git@github.com:squaremo/amqp.node.git","clone_url":"https://github.com/squaremo/amqp.node.git","svn_url":"https://github.com/squaremo/amqp.node","homepage":"https://squaremo.github.io/amqp.node/","size":713,"stargazers_count":1783,"watchers_count":1783,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":276,"mirror_url":null,"archived":false,"open_issues_count":156,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":276,"open_issues":156,"watchers":1783,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/squaremo/amqp.node/pulls/447"},"html":{"href":"https://github.com/squaremo/amqp.node/pull/447"},"issue":{"href":"https://api.github.com/repos/squaremo/amqp.node/issues/447"},"comments":{"href":"https://api.github.com/repos/squaremo/amqp.node/issues/447/comments"},"review_comments":{"href":"https://api.github.com/repos/squaremo/amqp.node/pulls/447/comments"},"review_comment":{"href":"https://api.github.com/repos/squaremo/amqp.node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/squaremo/amqp.node/pulls/447/commits"},"statuses":{"href":"https://api.github.com/repos/squaremo/amqp.node/statuses/7830c371dfc5a5899c13b2b79a805a13c1377118"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":35,"deletions":7,"changed_files":3}}
{"actor":{"display_login":"MitMaro"}}