{"action":"created","comment":{"url":"https://api.github.com/repos/starsirius/crystals/pulls/comments/72332819","id":72332819,"diff_hunk":"@@ -38,9 +43,14 @@ const ArtworkAttributeUpdatable = Wrapped => {\n         type: \"PUT\",\n         data: this.prepareData(formData),\n         dataType: \"json\"\n-      }).done((artwork) => {\n-        const updated = _.pick(artwork, _.keys(this.props.artwork));\n-        this.setState({artwork: updated, loading: false});\n+      }).done((data) => {\n+        if (_.has(data, \"error\")) {","path":"src/decorators/artwork_attribute_updatable.js","position":38,"original_position":38,"commit_id":"f95bf33096170a780c41fae887bae1b2ec81391e","original_commit_id":"f95bf33096170a780c41fae887bae1b2ec81391e","user":{"login":"starsirius","id":796573,"avatar_url":"https://avatars.githubusercontent.com/u/796573?v=3","gravatar_id":"","url":"https://api.github.com/users/starsirius","html_url":"https://github.com/starsirius","followers_url":"https://api.github.com/users/starsirius/followers","following_url":"https://api.github.com/users/starsirius/following{/other_user}","gists_url":"https://api.github.com/users/starsirius/gists{/gist_id}","starred_url":"https://api.github.com/users/starsirius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starsirius/subscriptions","organizations_url":"https://api.github.com/users/starsirius/orgs","repos_url":"https://api.github.com/users/starsirius/repos","events_url":"https://api.github.com/users/starsirius/events{/privacy}","received_events_url":"https://api.github.com/users/starsirius/received_events","type":"User","site_admin":false},"body":"Also, we may want to handle `$.ajax(...).fail()` cases in a similar way.","created_at":"2016-07-26T20:42:38Z","updated_at":"2016-07-26T20:42:38Z","html_url":"https://github.com/starsirius/crystals/pull/8#discussion_r72332819","pull_request_url":"https://api.github.com/repos/starsirius/crystals/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/starsirius/crystals/pulls/comments/72332819"},"html":{"href":"https://github.com/starsirius/crystals/pull/8#discussion_r72332819"},"pull_request":{"href":"https://api.github.com/repos/starsirius/crystals/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/starsirius/crystals/pulls/8","id":78921650,"html_url":"https://github.com/starsirius/crystals/pull/8","diff_url":"https://github.com/starsirius/crystals/pull/8.diff","patch_url":"https://github.com/starsirius/crystals/pull/8.patch","issue_url":"https://api.github.com/repos/starsirius/crystals/issues/8","number":8,"state":"open","locked":false,"title":"Change state modeling; trigger event on update errors.","user":{"login":"starsirius","id":796573,"avatar_url":"https://avatars.githubusercontent.com/u/796573?v=3","gravatar_id":"","url":"https://api.github.com/users/starsirius","html_url":"https://github.com/starsirius","followers_url":"https://api.github.com/users/starsirius/followers","following_url":"https://api.github.com/users/starsirius/following{/other_user}","gists_url":"https://api.github.com/users/starsirius/gists{/gist_id}","starred_url":"https://api.github.com/users/starsirius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starsirius/subscriptions","organizations_url":"https://api.github.com/users/starsirius/orgs","repos_url":"https://api.github.com/users/starsirius/repos","events_url":"https://api.github.com/users/starsirius/events{/privacy}","received_events_url":"https://api.github.com/users/starsirius/received_events","type":"User","site_admin":false},"body":"- Support more states.\r\n\r\n  We need to differentiate various states on the UI. This PR include possible states: \"inited\", \"updating\", \"updated\", \"errored\".\r\n\r\n- Trigger an `error.crystals` event on update error.\r\n\r\n  This is not ideal but we need to let the outside world handle the errors. Let's trigger an event for whoever is interested for now.","created_at":"2016-07-26T20:40:45Z","updated_at":"2016-07-26T20:42:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f5b3c7a1f9277e0e502eb76ced8ca29103a71527","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/starsirius/crystals/pulls/8/commits","review_comments_url":"https://api.github.com/repos/starsirius/crystals/pulls/8/comments","review_comment_url":"https://api.github.com/repos/starsirius/crystals/pulls/comments{/number}","comments_url":"https://api.github.com/repos/starsirius/crystals/issues/8/comments","statuses_url":"https://api.github.com/repos/starsirius/crystals/statuses/f95bf33096170a780c41fae887bae1b2ec81391e","head":{"label":"starsirius:errors","ref":"errors","sha":"f95bf33096170a780c41fae887bae1b2ec81391e","user":{"login":"starsirius","id":796573,"avatar_url":"https://avatars.githubusercontent.com/u/796573?v=3","gravatar_id":"","url":"https://api.github.com/users/starsirius","html_url":"https://github.com/starsirius","followers_url":"https://api.github.com/users/starsirius/followers","following_url":"https://api.github.com/users/starsirius/following{/other_user}","gists_url":"https://api.github.com/users/starsirius/gists{/gist_id}","starred_url":"https://api.github.com/users/starsirius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starsirius/subscriptions","organizations_url":"https://api.github.com/users/starsirius/orgs","repos_url":"https://api.github.com/users/starsirius/repos","events_url":"https://api.github.com/users/starsirius/events{/privacy}","received_events_url":"https://api.github.com/users/starsirius/received_events","type":"User","site_admin":false},"repo":{"id":59391294,"name":"crystals","full_name":"starsirius/crystals","owner":{"login":"starsirius","id":796573,"avatar_url":"https://avatars.githubusercontent.com/u/796573?v=3","gravatar_id":"","url":"https://api.github.com/users/starsirius","html_url":"https://github.com/starsirius","followers_url":"https://api.github.com/users/starsirius/followers","following_url":"https://api.github.com/users/starsirius/following{/other_user}","gists_url":"https://api.github.com/users/starsirius/gists{/gist_id}","starred_url":"https://api.github.com/users/starsirius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starsirius/subscriptions","organizations_url":"https://api.github.com/users/starsirius/orgs","repos_url":"https://api.github.com/users/starsirius/repos","events_url":"https://api.github.com/users/starsirius/events{/privacy}","received_events_url":"https://api.github.com/users/starsirius/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/starsirius/crystals","description":"Beautiful Demo - http://starsirius.github.io/crystals/","fork":false,"url":"https://api.github.com/repos/starsirius/crystals","forks_url":"https://api.github.com/repos/starsirius/crystals/forks","keys_url":"https://api.github.com/repos/starsirius/crystals/keys{/key_id}","collaborators_url":"https://api.github.com/repos/starsirius/crystals/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/starsirius/crystals/teams","hooks_url":"https://api.github.com/repos/starsirius/crystals/hooks","issue_events_url":"https://api.github.com/repos/starsirius/crystals/issues/events{/number}","events_url":"https://api.github.com/repos/starsirius/crystals/events","assignees_url":"https://api.github.com/repos/starsirius/crystals/assignees{/user}","branches_url":"https://api.github.com/repos/starsirius/crystals/branches{/branch}","tags_url":"https://api.github.com/repos/starsirius/crystals/tags","blobs_url":"https://api.github.com/repos/starsirius/crystals/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/starsirius/crystals/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/starsirius/crystals/git/refs{/sha}","trees_url":"https://api.github.com/repos/starsirius/crystals/git/trees{/sha}","statuses_url":"https://api.github.com/repos/starsirius/crystals/statuses/{sha}","languages_url":"https://api.github.com/repos/starsirius/crystals/languages","stargazers_url":"https://api.github.com/repos/starsirius/crystals/stargazers","contributors_url":"https://api.github.com/repos/starsirius/crystals/contributors","subscribers_url":"https://api.github.com/repos/starsirius/crystals/subscribers","subscription_url":"https://api.github.com/repos/starsirius/crystals/subscription","commits_url":"https://api.github.com/repos/starsirius/crystals/commits{/sha}","git_commits_url":"https://api.github.com/repos/starsirius/crystals/git/commits{/sha}","comments_url":"https://api.github.com/repos/starsirius/crystals/comments{/number}","issue_comment_url":"https://api.github.com/repos/starsirius/crystals/issues/comments{/number}","contents_url":"https://api.github.com/repos/starsirius/crystals/contents/{+path}","compare_url":"https://api.github.com/repos/starsirius/crystals/compare/{base}...{head}","merges_url":"https://api.github.com/repos/starsirius/crystals/merges","archive_url":"https://api.github.com/repos/starsirius/crystals/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/starsirius/crystals/downloads","issues_url":"https://api.github.com/repos/starsirius/crystals/issues{/number}","pulls_url":"https://api.github.com/repos/starsirius/crystals/pulls{/number}","milestones_url":"https://api.github.com/repos/starsirius/crystals/milestones{/number}","notifications_url":"https://api.github.com/repos/starsirius/crystals/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/starsirius/crystals/labels{/name}","releases_url":"https://api.github.com/repos/starsirius/crystals/releases{/id}","deployments_url":"https://api.github.com/repos/starsirius/crystals/deployments","created_at":"2016-05-22T02:34:41Z","updated_at":"2016-06-20T07:46:07Z","pushed_at":"2016-07-26T20:40:45Z","git_url":"git://github.com/starsirius/crystals.git","ssh_url":"git@github.com:starsirius/crystals.git","clone_url":"https://github.com/starsirius/crystals.git","svn_url":"https://github.com/starsirius/crystals","homepage":"","size":281,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"starsirius:master","ref":"master","sha":"f2224a7907770f143b8b885eb60d309d1251b726","user":{"login":"starsirius","id":796573,"avatar_url":"https://avatars.githubusercontent.com/u/796573?v=3","gravatar_id":"","url":"https://api.github.com/users/starsirius","html_url":"https://github.com/starsirius","followers_url":"https://api.github.com/users/starsirius/followers","following_url":"https://api.github.com/users/starsirius/following{/other_user}","gists_url":"https://api.github.com/users/starsirius/gists{/gist_id}","starred_url":"https://api.github.com/users/starsirius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starsirius/subscriptions","organizations_url":"https://api.github.com/users/starsirius/orgs","repos_url":"https://api.github.com/users/starsirius/repos","events_url":"https://api.github.com/users/starsirius/events{/privacy}","received_events_url":"https://api.github.com/users/starsirius/received_events","type":"User","site_admin":false},"repo":{"id":59391294,"name":"crystals","full_name":"starsirius/crystals","owner":{"login":"starsirius","id":796573,"avatar_url":"https://avatars.githubusercontent.com/u/796573?v=3","gravatar_id":"","url":"https://api.github.com/users/starsirius","html_url":"https://github.com/starsirius","followers_url":"https://api.github.com/users/starsirius/followers","following_url":"https://api.github.com/users/starsirius/following{/other_user}","gists_url":"https://api.github.com/users/starsirius/gists{/gist_id}","starred_url":"https://api.github.com/users/starsirius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starsirius/subscriptions","organizations_url":"https://api.github.com/users/starsirius/orgs","repos_url":"https://api.github.com/users/starsirius/repos","events_url":"https://api.github.com/users/starsirius/events{/privacy}","received_events_url":"https://api.github.com/users/starsirius/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/starsirius/crystals","description":"Beautiful Demo - http://starsirius.github.io/crystals/","fork":false,"url":"https://api.github.com/repos/starsirius/crystals","forks_url":"https://api.github.com/repos/starsirius/crystals/forks","keys_url":"https://api.github.com/repos/starsirius/crystals/keys{/key_id}","collaborators_url":"https://api.github.com/repos/starsirius/crystals/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/starsirius/crystals/teams","hooks_url":"https://api.github.com/repos/starsirius/crystals/hooks","issue_events_url":"https://api.github.com/repos/starsirius/crystals/issues/events{/number}","events_url":"https://api.github.com/repos/starsirius/crystals/events","assignees_url":"https://api.github.com/repos/starsirius/crystals/assignees{/user}","branches_url":"https://api.github.com/repos/starsirius/crystals/branches{/branch}","tags_url":"https://api.github.com/repos/starsirius/crystals/tags","blobs_url":"https://api.github.com/repos/starsirius/crystals/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/starsirius/crystals/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/starsirius/crystals/git/refs{/sha}","trees_url":"https://api.github.com/repos/starsirius/crystals/git/trees{/sha}","statuses_url":"https://api.github.com/repos/starsirius/crystals/statuses/{sha}","languages_url":"https://api.github.com/repos/starsirius/crystals/languages","stargazers_url":"https://api.github.com/repos/starsirius/crystals/stargazers","contributors_url":"https://api.github.com/repos/starsirius/crystals/contributors","subscribers_url":"https://api.github.com/repos/starsirius/crystals/subscribers","subscription_url":"https://api.github.com/repos/starsirius/crystals/subscription","commits_url":"https://api.github.com/repos/starsirius/crystals/commits{/sha}","git_commits_url":"https://api.github.com/repos/starsirius/crystals/git/commits{/sha}","comments_url":"https://api.github.com/repos/starsirius/crystals/comments{/number}","issue_comment_url":"https://api.github.com/repos/starsirius/crystals/issues/comments{/number}","contents_url":"https://api.github.com/repos/starsirius/crystals/contents/{+path}","compare_url":"https://api.github.com/repos/starsirius/crystals/compare/{base}...{head}","merges_url":"https://api.github.com/repos/starsirius/crystals/merges","archive_url":"https://api.github.com/repos/starsirius/crystals/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/starsirius/crystals/downloads","issues_url":"https://api.github.com/repos/starsirius/crystals/issues{/number}","pulls_url":"https://api.github.com/repos/starsirius/crystals/pulls{/number}","milestones_url":"https://api.github.com/repos/starsirius/crystals/milestones{/number}","notifications_url":"https://api.github.com/repos/starsirius/crystals/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/starsirius/crystals/labels{/name}","releases_url":"https://api.github.com/repos/starsirius/crystals/releases{/id}","deployments_url":"https://api.github.com/repos/starsirius/crystals/deployments","created_at":"2016-05-22T02:34:41Z","updated_at":"2016-06-20T07:46:07Z","pushed_at":"2016-07-26T20:40:45Z","git_url":"git://github.com/starsirius/crystals.git","ssh_url":"git@github.com:starsirius/crystals.git","clone_url":"https://github.com/starsirius/crystals.git","svn_url":"https://github.com/starsirius/crystals","homepage":"","size":281,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/starsirius/crystals/pulls/8"},"html":{"href":"https://github.com/starsirius/crystals/pull/8"},"issue":{"href":"https://api.github.com/repos/starsirius/crystals/issues/8"},"comments":{"href":"https://api.github.com/repos/starsirius/crystals/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/starsirius/crystals/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/starsirius/crystals/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/starsirius/crystals/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/starsirius/crystals/statuses/f95bf33096170a780c41fae887bae1b2ec81391e"}}}}
{"actor":{"display_login":"starsirius"}}