{"action":"closed","number":24892,"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/24892","id":188356048,"html_url":"https://github.com/Automattic/wp-calypso/pull/24892","diff_url":"https://github.com/Automattic/wp-calypso/pull/24892.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/24892.patch","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/24892","number":24892,"state":"closed","locked":false,"title":"Domains Signup: checking for valid args in getAvailabilityNotice","user":{"login":"ramonjd","id":6458278,"avatar_url":"https://avatars0.githubusercontent.com/u/6458278?v=4","gravatar_id":"","url":"https://api.github.com/users/ramonjd","html_url":"https://github.com/ramonjd","followers_url":"https://api.github.com/users/ramonjd/followers","following_url":"https://api.github.com/users/ramonjd/following{/other_user}","gists_url":"https://api.github.com/users/ramonjd/gists{/gist_id}","starred_url":"https://api.github.com/users/ramonjd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramonjd/subscriptions","organizations_url":"https://api.github.com/users/ramonjd/orgs","repos_url":"https://api.github.com/users/ramonjd/repos","events_url":"https://api.github.com/users/ramonjd/events{/privacy}","received_events_url":"https://api.github.com/users/ramonjd/received_events","type":"User","site_admin":false},"body":"This PR follows up on `p5XAZ9-1IL-p2` and the quick fix by @alisterscott in #24891\r\n\r\nAfter the bug fix PR #24720, `getAvailabilityNotice()` was receiving a null value for `errorData` from which it was attempting to extract object properties:\r\n\r\n```\r\nconst { site, maintenanceEndTime } = errorData;\r\n```\r\n\r\nHere, we're shoring up the internal defences of `getAvailabilityNotice()` so that it may decide internally what to do in the event of unexpected arguments.\r\n\r\nTests added.\r\n\r\n## Testing\r\n1. Fire up the branch and head to `/start` in an incognito tab (or logged-out state)\r\n2. Continue to the next step and enter a some special characters or emojis 🐝🐝🐝🐝🐝\r\n3. Try out an invalid domain name (`test.xxx`)\r\n4. Enter a domain name that is already registered and mapped with wordpress.com (e.g., illustratedshorts.com)\r\n5. Try to break in general :)\r\n\r\n### Expectations\r\n\r\n**At 2-5:** The relevant notices should display to the page.\r\n\r\n<img width=\"973\" alt=\"screen shot 2018-05-16 at 6 27 14 pm\" src=\"https://user-images.githubusercontent.com/6458278/40105837-766fd768-5937-11e8-8ed3-06fc170f792e.png\">\r\n\r\n<img width=\"987\" alt=\"screen shot 2018-05-16 at 6 20 14 pm\" src=\"https://user-images.githubusercontent.com/6458278/40105851-7f533e38-5937-11e8-8eb9-f1adcf71cdc2.png\">\r\n\r\n<img width=\"1015\" alt=\"screen shot 2018-05-16 at 6 20 03 pm\" src=\"https://user-images.githubusercontent.com/6458278/40105840-79b0714e-5937-11e8-852a-f446eabb59fc.png\">\r\n\r\n\r\n","created_at":"2018-05-16T08:34:13Z","updated_at":"2018-05-17T03:56:44Z","closed_at":"2018-05-17T03:56:44Z","merged_at":"2018-05-17T03:56:44Z","merge_commit_sha":"1fae98ea18288fa7679b3f25704c39d41276843f","assignee":{"login":"ramonjd","id":6458278,"avatar_url":"https://avatars0.githubusercontent.com/u/6458278?v=4","gravatar_id":"","url":"https://api.github.com/users/ramonjd","html_url":"https://github.com/ramonjd","followers_url":"https://api.github.com/users/ramonjd/followers","following_url":"https://api.github.com/users/ramonjd/following{/other_user}","gists_url":"https://api.github.com/users/ramonjd/gists{/gist_id}","starred_url":"https://api.github.com/users/ramonjd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramonjd/subscriptions","organizations_url":"https://api.github.com/users/ramonjd/orgs","repos_url":"https://api.github.com/users/ramonjd/repos","events_url":"https://api.github.com/users/ramonjd/events{/privacy}","received_events_url":"https://api.github.com/users/ramonjd/received_events","type":"User","site_admin":false},"assignees":[{"login":"ramonjd","id":6458278,"avatar_url":"https://avatars0.githubusercontent.com/u/6458278?v=4","gravatar_id":"","url":"https://api.github.com/users/ramonjd","html_url":"https://github.com/ramonjd","followers_url":"https://api.github.com/users/ramonjd/followers","following_url":"https://api.github.com/users/ramonjd/following{/other_user}","gists_url":"https://api.github.com/users/ramonjd/gists{/gist_id}","starred_url":"https://api.github.com/users/ramonjd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramonjd/subscriptions","organizations_url":"https://api.github.com/users/ramonjd/orgs","repos_url":"https://api.github.com/users/ramonjd/repos","events_url":"https://api.github.com/users/ramonjd/events{/privacy}","received_events_url":"https://api.github.com/users/ramonjd/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"delputnam","id":1379730,"avatar_url":"https://avatars2.githubusercontent.com/u/1379730?v=4","gravatar_id":"","url":"https://api.github.com/users/delputnam","html_url":"https://github.com/delputnam","followers_url":"https://api.github.com/users/delputnam/followers","following_url":"https://api.github.com/users/delputnam/following{/other_user}","gists_url":"https://api.github.com/users/delputnam/gists{/gist_id}","starred_url":"https://api.github.com/users/delputnam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delputnam/subscriptions","organizations_url":"https://api.github.com/users/delputnam/orgs","repos_url":"https://api.github.com/users/delputnam/repos","events_url":"https://api.github.com/users/delputnam/events{/privacy}","received_events_url":"https://api.github.com/users/delputnam/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":289076660,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Domains","name":"Domains","color":"006b75","default":false},{"id":285010057,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/NUX","name":"NUX","color":"006b75","default":false},{"id":285010049,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Signup","name":"Signup","color":"006b75","default":false},{"id":285010018,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20Needs%20Review","name":"[Status] Needs Review","color":"fbca04","default":false},{"id":285010109,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Type]%20Janitorial","name":"[Type] Janitorial","color":"fad8c7","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/24892/commits","review_comments_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/24892/comments","review_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/24892/comments","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/87868fb126be2d8589fa14481ef88d4197e15077","head":{"label":"Automattic:update/check-args-on-availability-notice","ref":"update/check-args-on-availability-notice","sha":"87868fb126be2d8589fa14481ef88d4197e15077","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":45936895,"name":"wp-calypso","full_name":"Automattic/wp-calypso","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/wp-calypso","description":"The JavaScript and API powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/wp-calypso/deployments","created_at":"2015-11-10T20:00:16Z","updated_at":"2018-05-17T01:33:06Z","pushed_at":"2018-05-17T03:56:44Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":88674,"stargazers_count":9953,"watchers_count":9953,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1401,"mirror_url":null,"archived":false,"open_issues_count":1524,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":1401,"open_issues":1524,"watchers":9953,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"90ca8ef0aef0075572de43059849575b53de7c8d","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":45936895,"name":"wp-calypso","full_name":"Automattic/wp-calypso","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/wp-calypso","description":"The JavaScript and API powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/wp-calypso/deployments","created_at":"2015-11-10T20:00:16Z","updated_at":"2018-05-17T01:33:06Z","pushed_at":"2018-05-17T03:56:44Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":88674,"stargazers_count":9953,"watchers_count":9953,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1401,"mirror_url":null,"archived":false,"open_issues_count":1524,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":1401,"open_issues":1524,"watchers":9953,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/24892"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/24892"},"issue":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/24892"},"comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/24892/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/24892/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/24892/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/wp-calypso/statuses/87868fb126be2d8589fa14481ef88d4197e15077"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"ramonjd","id":6458278,"avatar_url":"https://avatars0.githubusercontent.com/u/6458278?v=4","gravatar_id":"","url":"https://api.github.com/users/ramonjd","html_url":"https://github.com/ramonjd","followers_url":"https://api.github.com/users/ramonjd/followers","following_url":"https://api.github.com/users/ramonjd/following{/other_user}","gists_url":"https://api.github.com/users/ramonjd/gists{/gist_id}","starred_url":"https://api.github.com/users/ramonjd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramonjd/subscriptions","organizations_url":"https://api.github.com/users/ramonjd/orgs","repos_url":"https://api.github.com/users/ramonjd/repos","events_url":"https://api.github.com/users/ramonjd/events{/privacy}","received_events_url":"https://api.github.com/users/ramonjd/received_events","type":"User","site_admin":false},"comments":2,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":79,"deletions":7,"changed_files":3}}
{"actor":{"display_login":"ramonjd"}}