{"action":"created","comment":{"url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/pulls/comments/242583841","pull_request_review_id":186127177,"id":242583841,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MjU4Mzg0MQ==","diff_hunk":"@@ -26,16 +26,12 @@ const Source = ({ name, url }) => (\n );\n \n class Fiche extends React.Component {\n-  static async getInitialProps({ res, query }) {\n-    return await fetchFiche(query)\n-      .then(data => ({\n-        data\n-      }))\n-      .catch(e => {\n-        console.log(\"e\", e);\n-        res.statusCode = 404;\n-        throw e;\n-      });\n+  static async getInitialProps({ query }) {\n+    const data = await fetchFiche(query);\n+    if (data.status === 404) {\n+      return { data: { _source: {} } };\n+    }\n+    return { data: data };","path":"packages/code-du-travail-frontend/pages/fiche-ministere-travail.js","position":19,"original_position":19,"commit_id":"e198da3047b855f5f57f22e9a8116b7c2557ec2f","original_commit_id":"e198da3047b855f5f57f22e9a8116b7c2557ec2f","user":{"login":"douglasduteil","id":730511,"node_id":"MDQ6VXNlcjczMDUxMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/730511?v=4","gravatar_id":"","url":"https://api.github.com/users/douglasduteil","html_url":"https://github.com/douglasduteil","followers_url":"https://api.github.com/users/douglasduteil/followers","following_url":"https://api.github.com/users/douglasduteil/following{/other_user}","gists_url":"https://api.github.com/users/douglasduteil/gists{/gist_id}","starred_url":"https://api.github.com/users/douglasduteil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/douglasduteil/subscriptions","organizations_url":"https://api.github.com/users/douglasduteil/orgs","repos_url":"https://api.github.com/users/douglasduteil/repos","events_url":"https://api.github.com/users/douglasduteil/events{/privacy}","received_events_url":"https://api.github.com/users/douglasduteil/received_events","type":"User","site_admin":false},"body":"should be `return { data }` in ES6 no ?","created_at":"2018-12-18T15:31:50Z","updated_at":"2018-12-18T15:35:20Z","html_url":"https://github.com/SocialGouv/code-du-travail-numerique/pull/388#discussion_r242583841","pull_request_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/pulls/388","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/pulls/comments/242583841"},"html":{"href":"https://github.com/SocialGouv/code-du-travail-numerique/pull/388#discussion_r242583841"},"pull_request":{"href":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/pulls/388"}}},"pull_request":{"url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/pulls/388","id":239436354,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM5NDM2MzU0","html_url":"https://github.com/SocialGouv/code-du-travail-numerique/pull/388","diff_url":"https://github.com/SocialGouv/code-du-travail-numerique/pull/388.diff","patch_url":"https://github.com/SocialGouv/code-du-travail-numerique/pull/388.patch","issue_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/issues/388","number":388,"state":"open","locked":false,"title":"Lionelb/fix api getsingleitem response","user":{"login":"lionelB","id":160320,"node_id":"MDQ6VXNlcjE2MDMyMA==","avatar_url":"https://avatars1.githubusercontent.com/u/160320?v=4","gravatar_id":"","url":"https://api.github.com/users/lionelB","html_url":"https://github.com/lionelB","followers_url":"https://api.github.com/users/lionelB/followers","following_url":"https://api.github.com/users/lionelB/following{/other_user}","gists_url":"https://api.github.com/users/lionelB/gists{/gist_id}","starred_url":"https://api.github.com/users/lionelB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lionelB/subscriptions","organizations_url":"https://api.github.com/users/lionelB/orgs","repos_url":"https://api.github.com/users/lionelB/repos","events_url":"https://api.github.com/users/lionelB/events{/privacy}","received_events_url":"https://api.github.com/users/lionelB/received_events","type":"User","site_admin":false},"body":"closes #375","created_at":"2018-12-18T10:28:58Z","updated_at":"2018-12-18T15:35:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2c41c2a9f5322f3b78d66dbd7f9f2654b283d98a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/pulls/388/commits","review_comments_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/pulls/388/comments","review_comment_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/issues/388/comments","statuses_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/statuses/e198da3047b855f5f57f22e9a8116b7c2557ec2f","head":{"label":"SocialGouv:lionelb/fix-api-getsingleitem-response","ref":"lionelb/fix-api-getsingleitem-response","sha":"e198da3047b855f5f57f22e9a8116b7c2557ec2f","user":{"login":"SocialGouv","id":35456799,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1NDU2Nzk5","avatar_url":"https://avatars3.githubusercontent.com/u/35456799?v=4","gravatar_id":"","url":"https://api.github.com/users/SocialGouv","html_url":"https://github.com/SocialGouv","followers_url":"https://api.github.com/users/SocialGouv/followers","following_url":"https://api.github.com/users/SocialGouv/following{/other_user}","gists_url":"https://api.github.com/users/SocialGouv/gists{/gist_id}","starred_url":"https://api.github.com/users/SocialGouv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SocialGouv/subscriptions","organizations_url":"https://api.github.com/users/SocialGouv/orgs","repos_url":"https://api.github.com/users/SocialGouv/repos","events_url":"https://api.github.com/users/SocialGouv/events{/privacy}","received_events_url":"https://api.github.com/users/SocialGouv/received_events","type":"Organization","site_admin":false},"repo":{"id":131125682,"node_id":"MDEwOlJlcG9zaXRvcnkxMzExMjU2ODI=","name":"code-du-travail-numerique","full_name":"SocialGouv/code-du-travail-numerique","private":false,"owner":{"login":"SocialGouv","id":35456799,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1NDU2Nzk5","avatar_url":"https://avatars3.githubusercontent.com/u/35456799?v=4","gravatar_id":"","url":"https://api.github.com/users/SocialGouv","html_url":"https://github.com/SocialGouv","followers_url":"https://api.github.com/users/SocialGouv/followers","following_url":"https://api.github.com/users/SocialGouv/following{/other_user}","gists_url":"https://api.github.com/users/SocialGouv/gists{/gist_id}","starred_url":"https://api.github.com/users/SocialGouv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SocialGouv/subscriptions","organizations_url":"https://api.github.com/users/SocialGouv/orgs","repos_url":"https://api.github.com/users/SocialGouv/repos","events_url":"https://api.github.com/users/SocialGouv/events{/privacy}","received_events_url":"https://api.github.com/users/SocialGouv/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/SocialGouv/code-du-travail-numerique","description":"Prototype Code du Travail Numérique","fork":false,"url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique","forks_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/forks","keys_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/teams","hooks_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/hooks","issue_events_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/issues/events{/number}","events_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/events","assignees_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/assignees{/user}","branches_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/branches{/branch}","tags_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/tags","blobs_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/git/refs{/sha}","trees_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/statuses/{sha}","languages_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/languages","stargazers_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/stargazers","contributors_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/contributors","subscribers_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/subscribers","subscription_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/subscription","commits_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/commits{/sha}","git_commits_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/git/commits{/sha}","comments_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/comments{/number}","issue_comment_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/issues/comments{/number}","contents_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/contents/{+path}","compare_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/merges","archive_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/downloads","issues_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/issues{/number}","pulls_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/pulls{/number}","milestones_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/milestones{/number}","notifications_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/labels{/name}","releases_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/releases{/id}","deployments_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/deployments","created_at":"2018-04-26T08:37:10Z","updated_at":"2018-12-18T14:57:49Z","pushed_at":"2018-12-18T15:17:07Z","git_url":"git://github.com/SocialGouv/code-du-travail-numerique.git","ssh_url":"git@github.com:SocialGouv/code-du-travail-numerique.git","clone_url":"https://github.com/SocialGouv/code-du-travail-numerique.git","svn_url":"https://github.com/SocialGouv/code-du-travail-numerique","homepage":"https://codedutravail-dev.num.social.gouv.fr","size":27808,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":113,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":4,"open_issues":113,"watchers":5,"default_branch":"master"}},"base":{"label":"SocialGouv:master","ref":"master","sha":"1e40dacfdf2d133df837c7f362e227eda5d7b1f2","user":{"login":"SocialGouv","id":35456799,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1NDU2Nzk5","avatar_url":"https://avatars3.githubusercontent.com/u/35456799?v=4","gravatar_id":"","url":"https://api.github.com/users/SocialGouv","html_url":"https://github.com/SocialGouv","followers_url":"https://api.github.com/users/SocialGouv/followers","following_url":"https://api.github.com/users/SocialGouv/following{/other_user}","gists_url":"https://api.github.com/users/SocialGouv/gists{/gist_id}","starred_url":"https://api.github.com/users/SocialGouv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SocialGouv/subscriptions","organizations_url":"https://api.github.com/users/SocialGouv/orgs","repos_url":"https://api.github.com/users/SocialGouv/repos","events_url":"https://api.github.com/users/SocialGouv/events{/privacy}","received_events_url":"https://api.github.com/users/SocialGouv/received_events","type":"Organization","site_admin":false},"repo":{"id":131125682,"node_id":"MDEwOlJlcG9zaXRvcnkxMzExMjU2ODI=","name":"code-du-travail-numerique","full_name":"SocialGouv/code-du-travail-numerique","private":false,"owner":{"login":"SocialGouv","id":35456799,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1NDU2Nzk5","avatar_url":"https://avatars3.githubusercontent.com/u/35456799?v=4","gravatar_id":"","url":"https://api.github.com/users/SocialGouv","html_url":"https://github.com/SocialGouv","followers_url":"https://api.github.com/users/SocialGouv/followers","following_url":"https://api.github.com/users/SocialGouv/following{/other_user}","gists_url":"https://api.github.com/users/SocialGouv/gists{/gist_id}","starred_url":"https://api.github.com/users/SocialGouv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SocialGouv/subscriptions","organizations_url":"https://api.github.com/users/SocialGouv/orgs","repos_url":"https://api.github.com/users/SocialGouv/repos","events_url":"https://api.github.com/users/SocialGouv/events{/privacy}","received_events_url":"https://api.github.com/users/SocialGouv/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/SocialGouv/code-du-travail-numerique","description":"Prototype Code du Travail Numérique","fork":false,"url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique","forks_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/forks","keys_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/teams","hooks_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/hooks","issue_events_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/issues/events{/number}","events_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/events","assignees_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/assignees{/user}","branches_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/branches{/branch}","tags_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/tags","blobs_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/git/refs{/sha}","trees_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/statuses/{sha}","languages_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/languages","stargazers_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/stargazers","contributors_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/contributors","subscribers_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/subscribers","subscription_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/subscription","commits_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/commits{/sha}","git_commits_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/git/commits{/sha}","comments_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/comments{/number}","issue_comment_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/issues/comments{/number}","contents_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/contents/{+path}","compare_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/merges","archive_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/downloads","issues_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/issues{/number}","pulls_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/pulls{/number}","milestones_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/milestones{/number}","notifications_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/labels{/name}","releases_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/releases{/id}","deployments_url":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/deployments","created_at":"2018-04-26T08:37:10Z","updated_at":"2018-12-18T14:57:49Z","pushed_at":"2018-12-18T15:17:07Z","git_url":"git://github.com/SocialGouv/code-du-travail-numerique.git","ssh_url":"git@github.com:SocialGouv/code-du-travail-numerique.git","clone_url":"https://github.com/SocialGouv/code-du-travail-numerique.git","svn_url":"https://github.com/SocialGouv/code-du-travail-numerique","homepage":"https://codedutravail-dev.num.social.gouv.fr","size":27808,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":113,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":4,"open_issues":113,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/pulls/388"},"html":{"href":"https://github.com/SocialGouv/code-du-travail-numerique/pull/388"},"issue":{"href":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/issues/388"},"comments":{"href":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/issues/388/comments"},"review_comments":{"href":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/pulls/388/comments"},"review_comment":{"href":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/pulls/388/commits"},"statuses":{"href":"https://api.github.com/repos/SocialGouv/code-du-travail-numerique/statuses/e198da3047b855f5f57f22e9a8116b7c2557ec2f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"douglasduteil"}}