{"action":"opened","number":9231,"pull_request":{"url":"https://api.github.com/repos/gatsbyjs/gatsby/pulls/9231","id":224139920,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0MTM5OTIw","html_url":"https://github.com/gatsbyjs/gatsby/pull/9231","diff_url":"https://github.com/gatsbyjs/gatsby/pull/9231.diff","patch_url":"https://github.com/gatsbyjs/gatsby/pull/9231.patch","issue_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/9231","number":9231,"state":"open","locked":false,"title":"feat(gatsby-source-contentful): add options validation and more detailed error messages","user":{"login":"pieh","id":419821,"node_id":"MDQ6VXNlcjQxOTgyMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/419821?v=4","gravatar_id":"","url":"https://api.github.com/users/pieh","html_url":"https://github.com/pieh","followers_url":"https://api.github.com/users/pieh/followers","following_url":"https://api.github.com/users/pieh/following{/other_user}","gists_url":"https://api.github.com/users/pieh/gists{/gist_id}","starred_url":"https://api.github.com/users/pieh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pieh/subscriptions","organizations_url":"https://api.github.com/users/pieh/orgs","repos_url":"https://api.github.com/users/pieh/repos","events_url":"https://api.github.com/users/pieh/events{/privacy}","received_events_url":"https://api.github.com/users/pieh/received_events","type":"User","site_admin":false},"body":"missing required options will show\r\n```\r\nerror Problems with plugin options in gatsby-config:\r\n - Missing spaceId\r\n - Missing accessToken\r\n```\r\n\r\nwhen config options aren't missing but we can't connect to contentful api it will show something like \r\n```\r\nerror Accessing your Contentful space failed.\r\nTry running setting GATSBY_CONTENTFUL_OFFLINE=true to see if we can serve from cache.\r\n\r\nAuthorization error. Check if accessToken and environment is correct\r\n\r\nUsed options:\r\nspace       : rocybtov1ozk\r\naccessToken : 6f35edf0db39085e9b9c19bd92943e4519c77e72c852d961968665f1324bfc94s\r\nhost        : cdn.contentful.com                                                 [default value]\r\nenvironment : master                                                             [default value]\r\n```\r\ndepending on error thrown by client suggestion will change (tried to cover all scenarios here)\r\n\r\n/cc @Khaledgarbaya @rase- \r\n\r\nTODO: add some tests","created_at":"2018-10-19T00:42:11Z","updated_at":"2018-10-19T00:42:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1030072314,"node_id":"MDU6TGFiZWwxMDMwMDcyMzE0","url":"https://api.github.com/repos/gatsbyjs/gatsby/labels/status:%20WIP","name":"status: WIP","color":"daf282","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/gatsbyjs/gatsby/pulls/9231/commits","review_comments_url":"https://api.github.com/repos/gatsbyjs/gatsby/pulls/9231/comments","review_comment_url":"https://api.github.com/repos/gatsbyjs/gatsby/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/9231/comments","statuses_url":"https://api.github.com/repos/gatsbyjs/gatsby/statuses/6883037a2d37d252ac2564fb204262913a3a1d7f","head":{"label":"pieh:contentful-validation-and-errors","ref":"contentful-validation-and-errors","sha":"6883037a2d37d252ac2564fb204262913a3a1d7f","user":{"login":"pieh","id":419821,"node_id":"MDQ6VXNlcjQxOTgyMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/419821?v=4","gravatar_id":"","url":"https://api.github.com/users/pieh","html_url":"https://github.com/pieh","followers_url":"https://api.github.com/users/pieh/followers","following_url":"https://api.github.com/users/pieh/following{/other_user}","gists_url":"https://api.github.com/users/pieh/gists{/gist_id}","starred_url":"https://api.github.com/users/pieh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pieh/subscriptions","organizations_url":"https://api.github.com/users/pieh/orgs","repos_url":"https://api.github.com/users/pieh/repos","events_url":"https://api.github.com/users/pieh/events{/privacy}","received_events_url":"https://api.github.com/users/pieh/received_events","type":"User","site_admin":false},"repo":{"id":108410396,"node_id":"MDEwOlJlcG9zaXRvcnkxMDg0MTAzOTY=","name":"gatsby","full_name":"pieh/gatsby","private":false,"owner":{"login":"pieh","id":419821,"node_id":"MDQ6VXNlcjQxOTgyMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/419821?v=4","gravatar_id":"","url":"https://api.github.com/users/pieh","html_url":"https://github.com/pieh","followers_url":"https://api.github.com/users/pieh/followers","following_url":"https://api.github.com/users/pieh/following{/other_user}","gists_url":"https://api.github.com/users/pieh/gists{/gist_id}","starred_url":"https://api.github.com/users/pieh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pieh/subscriptions","organizations_url":"https://api.github.com/users/pieh/orgs","repos_url":"https://api.github.com/users/pieh/repos","events_url":"https://api.github.com/users/pieh/events{/privacy}","received_events_url":"https://api.github.com/users/pieh/received_events","type":"User","site_admin":false},"html_url":"https://github.com/pieh/gatsby","description":"⚛️📄🚀 Blazing fast static site generator for React","fork":true,"url":"https://api.github.com/repos/pieh/gatsby","forks_url":"https://api.github.com/repos/pieh/gatsby/forks","keys_url":"https://api.github.com/repos/pieh/gatsby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pieh/gatsby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pieh/gatsby/teams","hooks_url":"https://api.github.com/repos/pieh/gatsby/hooks","issue_events_url":"https://api.github.com/repos/pieh/gatsby/issues/events{/number}","events_url":"https://api.github.com/repos/pieh/gatsby/events","assignees_url":"https://api.github.com/repos/pieh/gatsby/assignees{/user}","branches_url":"https://api.github.com/repos/pieh/gatsby/branches{/branch}","tags_url":"https://api.github.com/repos/pieh/gatsby/tags","blobs_url":"https://api.github.com/repos/pieh/gatsby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pieh/gatsby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pieh/gatsby/git/refs{/sha}","trees_url":"https://api.github.com/repos/pieh/gatsby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pieh/gatsby/statuses/{sha}","languages_url":"https://api.github.com/repos/pieh/gatsby/languages","stargazers_url":"https://api.github.com/repos/pieh/gatsby/stargazers","contributors_url":"https://api.github.com/repos/pieh/gatsby/contributors","subscribers_url":"https://api.github.com/repos/pieh/gatsby/subscribers","subscription_url":"https://api.github.com/repos/pieh/gatsby/subscription","commits_url":"https://api.github.com/repos/pieh/gatsby/commits{/sha}","git_commits_url":"https://api.github.com/repos/pieh/gatsby/git/commits{/sha}","comments_url":"https://api.github.com/repos/pieh/gatsby/comments{/number}","issue_comment_url":"https://api.github.com/repos/pieh/gatsby/issues/comments{/number}","contents_url":"https://api.github.com/repos/pieh/gatsby/contents/{+path}","compare_url":"https://api.github.com/repos/pieh/gatsby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pieh/gatsby/merges","archive_url":"https://api.github.com/repos/pieh/gatsby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pieh/gatsby/downloads","issues_url":"https://api.github.com/repos/pieh/gatsby/issues{/number}","pulls_url":"https://api.github.com/repos/pieh/gatsby/pulls{/number}","milestones_url":"https://api.github.com/repos/pieh/gatsby/milestones{/number}","notifications_url":"https://api.github.com/repos/pieh/gatsby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pieh/gatsby/labels{/name}","releases_url":"https://api.github.com/repos/pieh/gatsby/releases{/id}","deployments_url":"https://api.github.com/repos/pieh/gatsby/deployments","created_at":"2017-10-26T12:46:04Z","updated_at":"2018-10-16T21:42:38Z","pushed_at":"2018-10-19T00:41:22Z","git_url":"git://github.com/pieh/gatsby.git","ssh_url":"git@github.com:pieh/gatsby.git","clone_url":"https://github.com/pieh/gatsby.git","svn_url":"https://github.com/pieh/gatsby","homepage":"https://www.gatsbyjs.org","size":737188,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"gatsbyjs:master","ref":"master","sha":"c57f1e0801462ce0691416fb90d513117147c689","user":{"login":"gatsbyjs","id":12551863,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTUxODYz","avatar_url":"https://avatars1.githubusercontent.com/u/12551863?v=4","gravatar_id":"","url":"https://api.github.com/users/gatsbyjs","html_url":"https://github.com/gatsbyjs","followers_url":"https://api.github.com/users/gatsbyjs/followers","following_url":"https://api.github.com/users/gatsbyjs/following{/other_user}","gists_url":"https://api.github.com/users/gatsbyjs/gists{/gist_id}","starred_url":"https://api.github.com/users/gatsbyjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gatsbyjs/subscriptions","organizations_url":"https://api.github.com/users/gatsbyjs/orgs","repos_url":"https://api.github.com/users/gatsbyjs/repos","events_url":"https://api.github.com/users/gatsbyjs/events{/privacy}","received_events_url":"https://api.github.com/users/gatsbyjs/received_events","type":"Organization","site_admin":false},"repo":{"id":36040894,"node_id":"MDEwOlJlcG9zaXRvcnkzNjA0MDg5NA==","name":"gatsby","full_name":"gatsbyjs/gatsby","private":false,"owner":{"login":"gatsbyjs","id":12551863,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTUxODYz","avatar_url":"https://avatars1.githubusercontent.com/u/12551863?v=4","gravatar_id":"","url":"https://api.github.com/users/gatsbyjs","html_url":"https://github.com/gatsbyjs","followers_url":"https://api.github.com/users/gatsbyjs/followers","following_url":"https://api.github.com/users/gatsbyjs/following{/other_user}","gists_url":"https://api.github.com/users/gatsbyjs/gists{/gist_id}","starred_url":"https://api.github.com/users/gatsbyjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gatsbyjs/subscriptions","organizations_url":"https://api.github.com/users/gatsbyjs/orgs","repos_url":"https://api.github.com/users/gatsbyjs/repos","events_url":"https://api.github.com/users/gatsbyjs/events{/privacy}","received_events_url":"https://api.github.com/users/gatsbyjs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/gatsbyjs/gatsby","description":"Build blazing fast, modern apps and websites with React","fork":false,"url":"https://api.github.com/repos/gatsbyjs/gatsby","forks_url":"https://api.github.com/repos/gatsbyjs/gatsby/forks","keys_url":"https://api.github.com/repos/gatsbyjs/gatsby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gatsbyjs/gatsby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gatsbyjs/gatsby/teams","hooks_url":"https://api.github.com/repos/gatsbyjs/gatsby/hooks","issue_events_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/events{/number}","events_url":"https://api.github.com/repos/gatsbyjs/gatsby/events","assignees_url":"https://api.github.com/repos/gatsbyjs/gatsby/assignees{/user}","branches_url":"https://api.github.com/repos/gatsbyjs/gatsby/branches{/branch}","tags_url":"https://api.github.com/repos/gatsbyjs/gatsby/tags","blobs_url":"https://api.github.com/repos/gatsbyjs/gatsby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gatsbyjs/gatsby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gatsbyjs/gatsby/git/refs{/sha}","trees_url":"https://api.github.com/repos/gatsbyjs/gatsby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gatsbyjs/gatsby/statuses/{sha}","languages_url":"https://api.github.com/repos/gatsbyjs/gatsby/languages","stargazers_url":"https://api.github.com/repos/gatsbyjs/gatsby/stargazers","contributors_url":"https://api.github.com/repos/gatsbyjs/gatsby/contributors","subscribers_url":"https://api.github.com/repos/gatsbyjs/gatsby/subscribers","subscription_url":"https://api.github.com/repos/gatsbyjs/gatsby/subscription","commits_url":"https://api.github.com/repos/gatsbyjs/gatsby/commits{/sha}","git_commits_url":"https://api.github.com/repos/gatsbyjs/gatsby/git/commits{/sha}","comments_url":"https://api.github.com/repos/gatsbyjs/gatsby/comments{/number}","issue_comment_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/comments{/number}","contents_url":"https://api.github.com/repos/gatsbyjs/gatsby/contents/{+path}","compare_url":"https://api.github.com/repos/gatsbyjs/gatsby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gatsbyjs/gatsby/merges","archive_url":"https://api.github.com/repos/gatsbyjs/gatsby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gatsbyjs/gatsby/downloads","issues_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues{/number}","pulls_url":"https://api.github.com/repos/gatsbyjs/gatsby/pulls{/number}","milestones_url":"https://api.github.com/repos/gatsbyjs/gatsby/milestones{/number}","notifications_url":"https://api.github.com/repos/gatsbyjs/gatsby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gatsbyjs/gatsby/labels{/name}","releases_url":"https://api.github.com/repos/gatsbyjs/gatsby/releases{/id}","deployments_url":"https://api.github.com/repos/gatsbyjs/gatsby/deployments","created_at":"2015-05-21T22:43:05Z","updated_at":"2018-10-19T00:38:29Z","pushed_at":"2018-10-19T00:13:17Z","git_url":"git://github.com/gatsbyjs/gatsby.git","ssh_url":"git@github.com:gatsbyjs/gatsby.git","clone_url":"https://github.com/gatsbyjs/gatsby.git","svn_url":"https://github.com/gatsbyjs/gatsby","homepage":"https://www.gatsbyjs.org","size":434398,"stargazers_count":26853,"watchers_count":26853,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3197,"mirror_url":null,"archived":false,"open_issues_count":750,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":3197,"open_issues":750,"watchers":26853,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gatsbyjs/gatsby/pulls/9231"},"html":{"href":"https://github.com/gatsbyjs/gatsby/pull/9231"},"issue":{"href":"https://api.github.com/repos/gatsbyjs/gatsby/issues/9231"},"comments":{"href":"https://api.github.com/repos/gatsbyjs/gatsby/issues/9231/comments"},"review_comments":{"href":"https://api.github.com/repos/gatsbyjs/gatsby/pulls/9231/comments"},"review_comment":{"href":"https://api.github.com/repos/gatsbyjs/gatsby/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gatsbyjs/gatsby/pulls/9231/commits"},"statuses":{"href":"https://api.github.com/repos/gatsbyjs/gatsby/statuses/6883037a2d37d252ac2564fb204262913a3a1d7f"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":69,"deletions":13,"changed_files":3}}
{"actor":{"display_login":"pieh"}}