{"action":"created","comment":{"url":"https://api.github.com/repos/wanderer911/weather-app/pulls/comments/201689808","pull_request_review_id":136239356,"id":201689808,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTY4OTgwOA==","diff_hunk":"@@ -23,4 +24,18 @@ function setForecastPeriod(number){\n     }catch(e){\n         console.log(e);\n     }\n+}\n+\n+async function getForecastByLatLng(latitude,longitude){\n+    const key = '6866075b0c665a854c8731d19df394eb';\n+    const url = `https://api.openweathermap.org/data/2.5/forecast?lat=${latitude}&lon=${longitude}&appid=${key}`;\n+    try{\n+        const result = await fetch(url,{\n+            method: 'get'\n+        });\n+        const json = await result.json();\n+        return json;\n+    }catch(e){\n+        return {error: e};","path":"src/services/forecastPeriod.service.js","position":25,"original_position":25,"commit_id":"128dd304dcb43f04efb53c6cf2bc79df7bc1fcda","original_commit_id":"128dd304dcb43f04efb53c6cf2bc79df7bc1fcda","user":{"login":"bohdan-lytvynov","id":16187265,"node_id":"MDQ6VXNlcjE2MTg3MjY1","avatar_url":"https://avatars3.githubusercontent.com/u/16187265?v=4","gravatar_id":"","url":"https://api.github.com/users/bohdan-lytvynov","html_url":"https://github.com/bohdan-lytvynov","followers_url":"https://api.github.com/users/bohdan-lytvynov/followers","following_url":"https://api.github.com/users/bohdan-lytvynov/following{/other_user}","gists_url":"https://api.github.com/users/bohdan-lytvynov/gists{/gist_id}","starred_url":"https://api.github.com/users/bohdan-lytvynov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bohdan-lytvynov/subscriptions","organizations_url":"https://api.github.com/users/bohdan-lytvynov/orgs","repos_url":"https://api.github.com/users/bohdan-lytvynov/repos","events_url":"https://api.github.com/users/bohdan-lytvynov/events{/privacy}","received_events_url":"https://api.github.com/users/bohdan-lytvynov/received_events","type":"User","site_admin":false},"body":"As far as you don't handle errors in action - don't catch errors here. It degrades readability of the code.","created_at":"2018-07-11T13:32:21Z","updated_at":"2018-07-11T13:32:21Z","html_url":"https://github.com/wanderer911/weather-app/pull/2#discussion_r201689808","pull_request_url":"https://api.github.com/repos/wanderer911/weather-app/pulls/2","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/wanderer911/weather-app/pulls/comments/201689808"},"html":{"href":"https://github.com/wanderer911/weather-app/pull/2#discussion_r201689808"},"pull_request":{"href":"https://api.github.com/repos/wanderer911/weather-app/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/wanderer911/weather-app/pulls/2","id":200381510,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwMzgxNTEw","html_url":"https://github.com/wanderer911/weather-app/pull/2","diff_url":"https://github.com/wanderer911/weather-app/pull/2.diff","patch_url":"https://github.com/wanderer911/weather-app/pull/2.patch","issue_url":"https://api.github.com/repos/wanderer911/weather-app/issues/2","number":2,"state":"open","locked":false,"title":"'develop0'","user":{"login":"wanderer911","id":13055251,"node_id":"MDQ6VXNlcjEzMDU1MjUx","avatar_url":"https://avatars3.githubusercontent.com/u/13055251?v=4","gravatar_id":"","url":"https://api.github.com/users/wanderer911","html_url":"https://github.com/wanderer911","followers_url":"https://api.github.com/users/wanderer911/followers","following_url":"https://api.github.com/users/wanderer911/following{/other_user}","gists_url":"https://api.github.com/users/wanderer911/gists{/gist_id}","starred_url":"https://api.github.com/users/wanderer911/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanderer911/subscriptions","organizations_url":"https://api.github.com/users/wanderer911/orgs","repos_url":"https://api.github.com/users/wanderer911/repos","events_url":"https://api.github.com/users/wanderer911/events{/privacy}","received_events_url":"https://api.github.com/users/wanderer911/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-10T12:37:25Z","updated_at":"2018-07-11T13:32:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aa32780c838d3e0126091d80e003c47249bef186","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/wanderer911/weather-app/pulls/2/commits","review_comments_url":"https://api.github.com/repos/wanderer911/weather-app/pulls/2/comments","review_comment_url":"https://api.github.com/repos/wanderer911/weather-app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wanderer911/weather-app/issues/2/comments","statuses_url":"https://api.github.com/repos/wanderer911/weather-app/statuses/128dd304dcb43f04efb53c6cf2bc79df7bc1fcda","head":{"label":"wanderer911:'develop0'","ref":"'develop0'","sha":"128dd304dcb43f04efb53c6cf2bc79df7bc1fcda","user":{"login":"wanderer911","id":13055251,"node_id":"MDQ6VXNlcjEzMDU1MjUx","avatar_url":"https://avatars3.githubusercontent.com/u/13055251?v=4","gravatar_id":"","url":"https://api.github.com/users/wanderer911","html_url":"https://github.com/wanderer911","followers_url":"https://api.github.com/users/wanderer911/followers","following_url":"https://api.github.com/users/wanderer911/following{/other_user}","gists_url":"https://api.github.com/users/wanderer911/gists{/gist_id}","starred_url":"https://api.github.com/users/wanderer911/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanderer911/subscriptions","organizations_url":"https://api.github.com/users/wanderer911/orgs","repos_url":"https://api.github.com/users/wanderer911/repos","events_url":"https://api.github.com/users/wanderer911/events{/privacy}","received_events_url":"https://api.github.com/users/wanderer911/received_events","type":"User","site_admin":false},"repo":{"id":139132535,"node_id":"MDEwOlJlcG9zaXRvcnkxMzkxMzI1MzU=","name":"weather-app","full_name":"wanderer911/weather-app","owner":{"login":"wanderer911","id":13055251,"node_id":"MDQ6VXNlcjEzMDU1MjUx","avatar_url":"https://avatars3.githubusercontent.com/u/13055251?v=4","gravatar_id":"","url":"https://api.github.com/users/wanderer911","html_url":"https://github.com/wanderer911","followers_url":"https://api.github.com/users/wanderer911/followers","following_url":"https://api.github.com/users/wanderer911/following{/other_user}","gists_url":"https://api.github.com/users/wanderer911/gists{/gist_id}","starred_url":"https://api.github.com/users/wanderer911/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanderer911/subscriptions","organizations_url":"https://api.github.com/users/wanderer911/orgs","repos_url":"https://api.github.com/users/wanderer911/repos","events_url":"https://api.github.com/users/wanderer911/events{/privacy}","received_events_url":"https://api.github.com/users/wanderer911/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wanderer911/weather-app","description":null,"fork":false,"url":"https://api.github.com/repos/wanderer911/weather-app","forks_url":"https://api.github.com/repos/wanderer911/weather-app/forks","keys_url":"https://api.github.com/repos/wanderer911/weather-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wanderer911/weather-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wanderer911/weather-app/teams","hooks_url":"https://api.github.com/repos/wanderer911/weather-app/hooks","issue_events_url":"https://api.github.com/repos/wanderer911/weather-app/issues/events{/number}","events_url":"https://api.github.com/repos/wanderer911/weather-app/events","assignees_url":"https://api.github.com/repos/wanderer911/weather-app/assignees{/user}","branches_url":"https://api.github.com/repos/wanderer911/weather-app/branches{/branch}","tags_url":"https://api.github.com/repos/wanderer911/weather-app/tags","blobs_url":"https://api.github.com/repos/wanderer911/weather-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wanderer911/weather-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wanderer911/weather-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/wanderer911/weather-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wanderer911/weather-app/statuses/{sha}","languages_url":"https://api.github.com/repos/wanderer911/weather-app/languages","stargazers_url":"https://api.github.com/repos/wanderer911/weather-app/stargazers","contributors_url":"https://api.github.com/repos/wanderer911/weather-app/contributors","subscribers_url":"https://api.github.com/repos/wanderer911/weather-app/subscribers","subscription_url":"https://api.github.com/repos/wanderer911/weather-app/subscription","commits_url":"https://api.github.com/repos/wanderer911/weather-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/wanderer911/weather-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/wanderer911/weather-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/wanderer911/weather-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/wanderer911/weather-app/contents/{+path}","compare_url":"https://api.github.com/repos/wanderer911/weather-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wanderer911/weather-app/merges","archive_url":"https://api.github.com/repos/wanderer911/weather-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wanderer911/weather-app/downloads","issues_url":"https://api.github.com/repos/wanderer911/weather-app/issues{/number}","pulls_url":"https://api.github.com/repos/wanderer911/weather-app/pulls{/number}","milestones_url":"https://api.github.com/repos/wanderer911/weather-app/milestones{/number}","notifications_url":"https://api.github.com/repos/wanderer911/weather-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wanderer911/weather-app/labels{/name}","releases_url":"https://api.github.com/repos/wanderer911/weather-app/releases{/id}","deployments_url":"https://api.github.com/repos/wanderer911/weather-app/deployments","created_at":"2018-06-29T09:51:52Z","updated_at":"2018-07-06T14:38:14Z","pushed_at":"2018-07-10T12:37:26Z","git_url":"git://github.com/wanderer911/weather-app.git","ssh_url":"git@github.com:wanderer911/weather-app.git","clone_url":"https://github.com/wanderer911/weather-app.git","svn_url":"https://github.com/wanderer911/weather-app","homepage":null,"size":431,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"wanderer911:master","ref":"master","sha":"6c187489c7cf7885cc4b3dbafa23f70ae5099676","user":{"login":"wanderer911","id":13055251,"node_id":"MDQ6VXNlcjEzMDU1MjUx","avatar_url":"https://avatars3.githubusercontent.com/u/13055251?v=4","gravatar_id":"","url":"https://api.github.com/users/wanderer911","html_url":"https://github.com/wanderer911","followers_url":"https://api.github.com/users/wanderer911/followers","following_url":"https://api.github.com/users/wanderer911/following{/other_user}","gists_url":"https://api.github.com/users/wanderer911/gists{/gist_id}","starred_url":"https://api.github.com/users/wanderer911/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanderer911/subscriptions","organizations_url":"https://api.github.com/users/wanderer911/orgs","repos_url":"https://api.github.com/users/wanderer911/repos","events_url":"https://api.github.com/users/wanderer911/events{/privacy}","received_events_url":"https://api.github.com/users/wanderer911/received_events","type":"User","site_admin":false},"repo":{"id":139132535,"node_id":"MDEwOlJlcG9zaXRvcnkxMzkxMzI1MzU=","name":"weather-app","full_name":"wanderer911/weather-app","owner":{"login":"wanderer911","id":13055251,"node_id":"MDQ6VXNlcjEzMDU1MjUx","avatar_url":"https://avatars3.githubusercontent.com/u/13055251?v=4","gravatar_id":"","url":"https://api.github.com/users/wanderer911","html_url":"https://github.com/wanderer911","followers_url":"https://api.github.com/users/wanderer911/followers","following_url":"https://api.github.com/users/wanderer911/following{/other_user}","gists_url":"https://api.github.com/users/wanderer911/gists{/gist_id}","starred_url":"https://api.github.com/users/wanderer911/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanderer911/subscriptions","organizations_url":"https://api.github.com/users/wanderer911/orgs","repos_url":"https://api.github.com/users/wanderer911/repos","events_url":"https://api.github.com/users/wanderer911/events{/privacy}","received_events_url":"https://api.github.com/users/wanderer911/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wanderer911/weather-app","description":null,"fork":false,"url":"https://api.github.com/repos/wanderer911/weather-app","forks_url":"https://api.github.com/repos/wanderer911/weather-app/forks","keys_url":"https://api.github.com/repos/wanderer911/weather-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wanderer911/weather-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wanderer911/weather-app/teams","hooks_url":"https://api.github.com/repos/wanderer911/weather-app/hooks","issue_events_url":"https://api.github.com/repos/wanderer911/weather-app/issues/events{/number}","events_url":"https://api.github.com/repos/wanderer911/weather-app/events","assignees_url":"https://api.github.com/repos/wanderer911/weather-app/assignees{/user}","branches_url":"https://api.github.com/repos/wanderer911/weather-app/branches{/branch}","tags_url":"https://api.github.com/repos/wanderer911/weather-app/tags","blobs_url":"https://api.github.com/repos/wanderer911/weather-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wanderer911/weather-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wanderer911/weather-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/wanderer911/weather-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wanderer911/weather-app/statuses/{sha}","languages_url":"https://api.github.com/repos/wanderer911/weather-app/languages","stargazers_url":"https://api.github.com/repos/wanderer911/weather-app/stargazers","contributors_url":"https://api.github.com/repos/wanderer911/weather-app/contributors","subscribers_url":"https://api.github.com/repos/wanderer911/weather-app/subscribers","subscription_url":"https://api.github.com/repos/wanderer911/weather-app/subscription","commits_url":"https://api.github.com/repos/wanderer911/weather-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/wanderer911/weather-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/wanderer911/weather-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/wanderer911/weather-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/wanderer911/weather-app/contents/{+path}","compare_url":"https://api.github.com/repos/wanderer911/weather-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wanderer911/weather-app/merges","archive_url":"https://api.github.com/repos/wanderer911/weather-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wanderer911/weather-app/downloads","issues_url":"https://api.github.com/repos/wanderer911/weather-app/issues{/number}","pulls_url":"https://api.github.com/repos/wanderer911/weather-app/pulls{/number}","milestones_url":"https://api.github.com/repos/wanderer911/weather-app/milestones{/number}","notifications_url":"https://api.github.com/repos/wanderer911/weather-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wanderer911/weather-app/labels{/name}","releases_url":"https://api.github.com/repos/wanderer911/weather-app/releases{/id}","deployments_url":"https://api.github.com/repos/wanderer911/weather-app/deployments","created_at":"2018-06-29T09:51:52Z","updated_at":"2018-07-06T14:38:14Z","pushed_at":"2018-07-10T12:37:26Z","git_url":"git://github.com/wanderer911/weather-app.git","ssh_url":"git@github.com:wanderer911/weather-app.git","clone_url":"https://github.com/wanderer911/weather-app.git","svn_url":"https://github.com/wanderer911/weather-app","homepage":null,"size":431,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wanderer911/weather-app/pulls/2"},"html":{"href":"https://github.com/wanderer911/weather-app/pull/2"},"issue":{"href":"https://api.github.com/repos/wanderer911/weather-app/issues/2"},"comments":{"href":"https://api.github.com/repos/wanderer911/weather-app/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/wanderer911/weather-app/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/wanderer911/weather-app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wanderer911/weather-app/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/wanderer911/weather-app/statuses/128dd304dcb43f04efb53c6cf2bc79df7bc1fcda"}},"author_association":"OWNER"}}
{"actor":{"display_login":"bohdan-lytvynov"}}