{"action":"created","comment":{"url":"https://api.github.com/repos/HackYourFuture/React/pulls/comments/179911016","pull_request_review_id":110249135,"id":179911016,"diff_hunk":"@@ -0,0 +1,150 @@\n+import { observable, action, runInAction } from 'mobx'\n+\n+// Setting our localStorage\n+// import { locals } from '../utils'\n+\n+// set the default state of the items Object\n+const default_item_state = {\n+  description: '',\n+  deadline: '',\n+}\n+\n+async function request(url, method, inputToString) {\n+  const params = {\n+    \"body\": JSON.stringify(inputToString),\n+    \"headers\": {\n+      \"Content-type\": \"application/json\"\n+    }\n+  }\n+\n+  let options = {}\n+  method = method ? method.toUpperCase() : \"GET\"\n+  switch (method) {\n+    case \"POST\":\n+    case \"PATCH\":\n+      options = { method, ...params, }\n+      break\n+    default:\n+      options = { method }\n+  }\n+\n+  // is't Okay to catch the errors here with in ","path":"documentation/homework/week4/src/stores/todo_actions.js","position":31,"original_position":31,"commit_id":"51abad43fe93f76a2c4287f1658ca976d7bc532e","original_commit_id":"51abad43fe93f76a2c4287f1658ca976d7bc532e","user":{"login":"isaachinman","id":10575782,"avatar_url":"https://avatars1.githubusercontent.com/u/10575782?v=4","gravatar_id":"","url":"https://api.github.com/users/isaachinman","html_url":"https://github.com/isaachinman","followers_url":"https://api.github.com/users/isaachinman/followers","following_url":"https://api.github.com/users/isaachinman/following{/other_user}","gists_url":"https://api.github.com/users/isaachinman/gists{/gist_id}","starred_url":"https://api.github.com/users/isaachinman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isaachinman/subscriptions","organizations_url":"https://api.github.com/users/isaachinman/orgs","repos_url":"https://api.github.com/users/isaachinman/repos","events_url":"https://api.github.com/users/isaachinman/events{/privacy}","received_events_url":"https://api.github.com/users/isaachinman/received_events","type":"User","site_admin":false},"body":"Not entirely sure what you are asking but I'll respond in general:\r\n\r\nErrors \"bubble\". If you don't catch them inside your `request` helper, you'll need to catch them one level up, eg wherever you call `request()`. Either way is fine, but typically you'd expect a helper like `request` to pass errors up through invocation, not handle them itself. Imagine we were using `request` in multiple stores, and each store wanted to handle errors in a slightly different way.\r\n\r\nThe only hard rule is that you _must_ catch errors somewhere. Uncaught rejections will soon be a breaking runtime error in Node.","created_at":"2018-04-07T07:40:25Z","updated_at":"2018-04-07T07:45:57Z","html_url":"https://github.com/HackYourFuture/React/pull/82#discussion_r179911016","pull_request_url":"https://api.github.com/repos/HackYourFuture/React/pulls/82","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/HackYourFuture/React/pulls/comments/179911016"},"html":{"href":"https://github.com/HackYourFuture/React/pull/82#discussion_r179911016"},"pull_request":{"href":"https://api.github.com/repos/HackYourFuture/React/pulls/82"}}},"pull_request":{"url":"https://api.github.com/repos/HackYourFuture/React/pulls/82","id":179538748,"html_url":"https://github.com/HackYourFuture/React/pull/82","diff_url":"https://github.com/HackYourFuture/React/pull/82.diff","patch_url":"https://github.com/HackYourFuture/React/pull/82.patch","issue_url":"https://api.github.com/repos/HackYourFuture/React/issues/82","number":82,"state":"open","locked":false,"title":"HW 5","user":{"login":"JawharBairakdar","id":25272822,"avatar_url":"https://avatars0.githubusercontent.com/u/25272822?v=4","gravatar_id":"","url":"https://api.github.com/users/JawharBairakdar","html_url":"https://github.com/JawharBairakdar","followers_url":"https://api.github.com/users/JawharBairakdar/followers","following_url":"https://api.github.com/users/JawharBairakdar/following{/other_user}","gists_url":"https://api.github.com/users/JawharBairakdar/gists{/gist_id}","starred_url":"https://api.github.com/users/JawharBairakdar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JawharBairakdar/subscriptions","organizations_url":"https://api.github.com/users/JawharBairakdar/orgs","repos_url":"https://api.github.com/users/JawharBairakdar/repos","events_url":"https://api.github.com/users/JawharBairakdar/events{/privacy}","received_events_url":"https://api.github.com/users/JawharBairakdar/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-04-04T23:29:55Z","updated_at":"2018-04-07T07:45:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab063a28d72c33534efc09ff6c5cbf0654252cb4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":891094388,"url":"https://api.github.com/repos/HackYourFuture/React/labels/class12","name":"class12","color":"bfdadc","default":false},{"id":891096527,"url":"https://api.github.com/repos/HackYourFuture/React/labels/homework5","name":"homework5","color":"fcd8a9","default":false},{"id":891098789,"url":"https://api.github.com/repos/HackYourFuture/React/labels/to%20review","name":"to review","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/HackYourFuture/React/pulls/82/commits","review_comments_url":"https://api.github.com/repos/HackYourFuture/React/pulls/82/comments","review_comment_url":"https://api.github.com/repos/HackYourFuture/React/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HackYourFuture/React/issues/82/comments","statuses_url":"https://api.github.com/repos/HackYourFuture/React/statuses/51abad43fe93f76a2c4287f1658ca976d7bc532e","head":{"label":"JawharBairakdar:master","ref":"master","sha":"51abad43fe93f76a2c4287f1658ca976d7bc532e","user":{"login":"JawharBairakdar","id":25272822,"avatar_url":"https://avatars0.githubusercontent.com/u/25272822?v=4","gravatar_id":"","url":"https://api.github.com/users/JawharBairakdar","html_url":"https://github.com/JawharBairakdar","followers_url":"https://api.github.com/users/JawharBairakdar/followers","following_url":"https://api.github.com/users/JawharBairakdar/following{/other_user}","gists_url":"https://api.github.com/users/JawharBairakdar/gists{/gist_id}","starred_url":"https://api.github.com/users/JawharBairakdar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JawharBairakdar/subscriptions","organizations_url":"https://api.github.com/users/JawharBairakdar/orgs","repos_url":"https://api.github.com/users/JawharBairakdar/repos","events_url":"https://api.github.com/users/JawharBairakdar/events{/privacy}","received_events_url":"https://api.github.com/users/JawharBairakdar/received_events","type":"User","site_admin":false},"repo":{"id":123605306,"name":"React","full_name":"JawharBairakdar/React","owner":{"login":"JawharBairakdar","id":25272822,"avatar_url":"https://avatars0.githubusercontent.com/u/25272822?v=4","gravatar_id":"","url":"https://api.github.com/users/JawharBairakdar","html_url":"https://github.com/JawharBairakdar","followers_url":"https://api.github.com/users/JawharBairakdar/followers","following_url":"https://api.github.com/users/JawharBairakdar/following{/other_user}","gists_url":"https://api.github.com/users/JawharBairakdar/gists{/gist_id}","starred_url":"https://api.github.com/users/JawharBairakdar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JawharBairakdar/subscriptions","organizations_url":"https://api.github.com/users/JawharBairakdar/orgs","repos_url":"https://api.github.com/users/JawharBairakdar/repos","events_url":"https://api.github.com/users/JawharBairakdar/events{/privacy}","received_events_url":"https://api.github.com/users/JawharBairakdar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JawharBairakdar/React","description":"Specifications React Module","fork":true,"url":"https://api.github.com/repos/JawharBairakdar/React","forks_url":"https://api.github.com/repos/JawharBairakdar/React/forks","keys_url":"https://api.github.com/repos/JawharBairakdar/React/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JawharBairakdar/React/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JawharBairakdar/React/teams","hooks_url":"https://api.github.com/repos/JawharBairakdar/React/hooks","issue_events_url":"https://api.github.com/repos/JawharBairakdar/React/issues/events{/number}","events_url":"https://api.github.com/repos/JawharBairakdar/React/events","assignees_url":"https://api.github.com/repos/JawharBairakdar/React/assignees{/user}","branches_url":"https://api.github.com/repos/JawharBairakdar/React/branches{/branch}","tags_url":"https://api.github.com/repos/JawharBairakdar/React/tags","blobs_url":"https://api.github.com/repos/JawharBairakdar/React/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JawharBairakdar/React/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JawharBairakdar/React/git/refs{/sha}","trees_url":"https://api.github.com/repos/JawharBairakdar/React/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JawharBairakdar/React/statuses/{sha}","languages_url":"https://api.github.com/repos/JawharBairakdar/React/languages","stargazers_url":"https://api.github.com/repos/JawharBairakdar/React/stargazers","contributors_url":"https://api.github.com/repos/JawharBairakdar/React/contributors","subscribers_url":"https://api.github.com/repos/JawharBairakdar/React/subscribers","subscription_url":"https://api.github.com/repos/JawharBairakdar/React/subscription","commits_url":"https://api.github.com/repos/JawharBairakdar/React/commits{/sha}","git_commits_url":"https://api.github.com/repos/JawharBairakdar/React/git/commits{/sha}","comments_url":"https://api.github.com/repos/JawharBairakdar/React/comments{/number}","issue_comment_url":"https://api.github.com/repos/JawharBairakdar/React/issues/comments{/number}","contents_url":"https://api.github.com/repos/JawharBairakdar/React/contents/{+path}","compare_url":"https://api.github.com/repos/JawharBairakdar/React/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JawharBairakdar/React/merges","archive_url":"https://api.github.com/repos/JawharBairakdar/React/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JawharBairakdar/React/downloads","issues_url":"https://api.github.com/repos/JawharBairakdar/React/issues{/number}","pulls_url":"https://api.github.com/repos/JawharBairakdar/React/pulls{/number}","milestones_url":"https://api.github.com/repos/JawharBairakdar/React/milestones{/number}","notifications_url":"https://api.github.com/repos/JawharBairakdar/React/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JawharBairakdar/React/labels{/name}","releases_url":"https://api.github.com/repos/JawharBairakdar/React/releases{/id}","deployments_url":"https://api.github.com/repos/JawharBairakdar/React/deployments","created_at":"2018-03-02T16:49:04Z","updated_at":"2018-04-05T00:57:20Z","pushed_at":"2018-04-05T00:57:19Z","git_url":"git://github.com/JawharBairakdar/React.git","ssh_url":"git@github.com:JawharBairakdar/React.git","clone_url":"https://github.com/JawharBairakdar/React.git","svn_url":"https://github.com/JawharBairakdar/React","homepage":null,"size":709,"stargazers_count":0,"watchers_count":0,"language":null,"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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"HackYourFuture:master","ref":"master","sha":"5a366e0e157dfe2ffeb88d47ec4de4fa6256d5cf","user":{"login":"HackYourFuture","id":20858568,"avatar_url":"https://avatars2.githubusercontent.com/u/20858568?v=4","gravatar_id":"","url":"https://api.github.com/users/HackYourFuture","html_url":"https://github.com/HackYourFuture","followers_url":"https://api.github.com/users/HackYourFuture/followers","following_url":"https://api.github.com/users/HackYourFuture/following{/other_user}","gists_url":"https://api.github.com/users/HackYourFuture/gists{/gist_id}","starred_url":"https://api.github.com/users/HackYourFuture/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HackYourFuture/subscriptions","organizations_url":"https://api.github.com/users/HackYourFuture/orgs","repos_url":"https://api.github.com/users/HackYourFuture/repos","events_url":"https://api.github.com/users/HackYourFuture/events{/privacy}","received_events_url":"https://api.github.com/users/HackYourFuture/received_events","type":"Organization","site_admin":false},"repo":{"id":93503545,"name":"React","full_name":"HackYourFuture/React","owner":{"login":"HackYourFuture","id":20858568,"avatar_url":"https://avatars2.githubusercontent.com/u/20858568?v=4","gravatar_id":"","url":"https://api.github.com/users/HackYourFuture","html_url":"https://github.com/HackYourFuture","followers_url":"https://api.github.com/users/HackYourFuture/followers","following_url":"https://api.github.com/users/HackYourFuture/following{/other_user}","gists_url":"https://api.github.com/users/HackYourFuture/gists{/gist_id}","starred_url":"https://api.github.com/users/HackYourFuture/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HackYourFuture/subscriptions","organizations_url":"https://api.github.com/users/HackYourFuture/orgs","repos_url":"https://api.github.com/users/HackYourFuture/repos","events_url":"https://api.github.com/users/HackYourFuture/events{/privacy}","received_events_url":"https://api.github.com/users/HackYourFuture/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HackYourFuture/React","description":"Specifications React Module","fork":false,"url":"https://api.github.com/repos/HackYourFuture/React","forks_url":"https://api.github.com/repos/HackYourFuture/React/forks","keys_url":"https://api.github.com/repos/HackYourFuture/React/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HackYourFuture/React/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HackYourFuture/React/teams","hooks_url":"https://api.github.com/repos/HackYourFuture/React/hooks","issue_events_url":"https://api.github.com/repos/HackYourFuture/React/issues/events{/number}","events_url":"https://api.github.com/repos/HackYourFuture/React/events","assignees_url":"https://api.github.com/repos/HackYourFuture/React/assignees{/user}","branches_url":"https://api.github.com/repos/HackYourFuture/React/branches{/branch}","tags_url":"https://api.github.com/repos/HackYourFuture/React/tags","blobs_url":"https://api.github.com/repos/HackYourFuture/React/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HackYourFuture/React/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HackYourFuture/React/git/refs{/sha}","trees_url":"https://api.github.com/repos/HackYourFuture/React/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HackYourFuture/React/statuses/{sha}","languages_url":"https://api.github.com/repos/HackYourFuture/React/languages","stargazers_url":"https://api.github.com/repos/HackYourFuture/React/stargazers","contributors_url":"https://api.github.com/repos/HackYourFuture/React/contributors","subscribers_url":"https://api.github.com/repos/HackYourFuture/React/subscribers","subscription_url":"https://api.github.com/repos/HackYourFuture/React/subscription","commits_url":"https://api.github.com/repos/HackYourFuture/React/commits{/sha}","git_commits_url":"https://api.github.com/repos/HackYourFuture/React/git/commits{/sha}","comments_url":"https://api.github.com/repos/HackYourFuture/React/comments{/number}","issue_comment_url":"https://api.github.com/repos/HackYourFuture/React/issues/comments{/number}","contents_url":"https://api.github.com/repos/HackYourFuture/React/contents/{+path}","compare_url":"https://api.github.com/repos/HackYourFuture/React/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HackYourFuture/React/merges","archive_url":"https://api.github.com/repos/HackYourFuture/React/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HackYourFuture/React/downloads","issues_url":"https://api.github.com/repos/HackYourFuture/React/issues{/number}","pulls_url":"https://api.github.com/repos/HackYourFuture/React/pulls{/number}","milestones_url":"https://api.github.com/repos/HackYourFuture/React/milestones{/number}","notifications_url":"https://api.github.com/repos/HackYourFuture/React/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HackYourFuture/React/labels{/name}","releases_url":"https://api.github.com/repos/HackYourFuture/React/releases{/id}","deployments_url":"https://api.github.com/repos/HackYourFuture/React/deployments","created_at":"2017-06-06T09:58:23Z","updated_at":"2018-04-07T07:07:15Z","pushed_at":"2018-04-07T07:07:13Z","git_url":"git://github.com/HackYourFuture/React.git","ssh_url":"git@github.com:HackYourFuture/React.git","clone_url":"https://github.com/HackYourFuture/React.git","svn_url":"https://github.com/HackYourFuture/React","homepage":null,"size":763,"stargazers_count":12,"watchers_count":12,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":41,"mirror_url":null,"archived":false,"open_issues_count":6,"license":null,"forks":41,"open_issues":6,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HackYourFuture/React/pulls/82"},"html":{"href":"https://github.com/HackYourFuture/React/pull/82"},"issue":{"href":"https://api.github.com/repos/HackYourFuture/React/issues/82"},"comments":{"href":"https://api.github.com/repos/HackYourFuture/React/issues/82/comments"},"review_comments":{"href":"https://api.github.com/repos/HackYourFuture/React/pulls/82/comments"},"review_comment":{"href":"https://api.github.com/repos/HackYourFuture/React/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HackYourFuture/React/pulls/82/commits"},"statuses":{"href":"https://api.github.com/repos/HackYourFuture/React/statuses/51abad43fe93f76a2c4287f1658ca976d7bc532e"}},"author_association":"NONE"}}
{"actor":{"display_login":"isaachinman"}}