{"action":"created","comment":{"url":"https://api.github.com/repos/mesosphere/marathon-ui/pulls/comments/39265450","id":39265450,"diff_hunk":"@@ -140,6 +197,24 @@ function executeAction(action, setFieldFunction) {\n   }\n }\n \n+function onAppsErrorResponse(response, statusCode) {\n+  AppFormStore.responseErrors = {};\n+  processResponseErrors(AppFormStore.responseErrors, response, statusCode);\n+}\n+\n+AppsStore.on(AppsEvents.CREATE_APP_ERROR, function (data, status) {\n+  onAppsErrorResponse(data, status);\n+});\n+AppsStore.on(AppsEvents.APPLY_APP_ERROR, function (data, isEditing, status) {\n+  onAppsErrorResponse(data, status);\n+});\n+AppsStore.on(AppsEvents.CREATE_APP, function () {\n+  AppFormStore.responseErrors = {};\n+});\n+AppsStore.on(AppsEvents.APPLY_APP, function () {\n+  AppFormStore.responseErrors = {};\n+});\n+","path":"src/js/stores/AppFormStore.js","position":110,"original_position":110,"commit_id":"2f486ed85ef2b4d6139f8384552cfc0febc86d4e","original_commit_id":"2f486ed85ef2b4d6139f8384552cfc0febc86d4e","user":{"login":"pierlo-upitup","id":1078545,"avatar_url":"https://avatars.githubusercontent.com/u/1078545?v=3","gravatar_id":"","url":"https://api.github.com/users/pierlo-upitup","html_url":"https://github.com/pierlo-upitup","followers_url":"https://api.github.com/users/pierlo-upitup/followers","following_url":"https://api.github.com/users/pierlo-upitup/following{/other_user}","gists_url":"https://api.github.com/users/pierlo-upitup/gists{/gist_id}","starred_url":"https://api.github.com/users/pierlo-upitup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierlo-upitup/subscriptions","organizations_url":"https://api.github.com/users/pierlo-upitup/orgs","repos_url":"https://api.github.com/users/pierlo-upitup/repos","events_url":"https://api.github.com/users/pierlo-upitup/events{/privacy}","received_events_url":"https://api.github.com/users/pierlo-upitup/received_events","type":"User","site_admin":false},"body":"I made up my mind, I see no side-effects in doing this, so I give it a :+1: ","created_at":"2015-09-11T12:21:35Z","updated_at":"2015-09-11T12:21:35Z","html_url":"https://github.com/mesosphere/marathon-ui/pull/199#discussion_r39265450","pull_request_url":"https://api.github.com/repos/mesosphere/marathon-ui/pulls/199","_links":{"self":{"href":"https://api.github.com/repos/mesosphere/marathon-ui/pulls/comments/39265450"},"html":{"href":"https://github.com/mesosphere/marathon-ui/pull/199#discussion_r39265450"},"pull_request":{"href":"https://api.github.com/repos/mesosphere/marathon-ui/pulls/199"}}},"pull_request":{"url":"https://api.github.com/repos/mesosphere/marathon-ui/pulls/199","id":44662211,"html_url":"https://github.com/mesosphere/marathon-ui/pull/199","diff_url":"https://github.com/mesosphere/marathon-ui/pull/199.diff","patch_url":"https://github.com/mesosphere/marathon-ui/pull/199.patch","issue_url":"https://api.github.com/repos/mesosphere/marathon-ui/issues/199","number":199,"state":"open","locked":false,"title":"2105 server errors","user":{"login":"aldipower","id":859154,"avatar_url":"https://avatars.githubusercontent.com/u/859154?v=3","gravatar_id":"","url":"https://api.github.com/users/aldipower","html_url":"https://github.com/aldipower","followers_url":"https://api.github.com/users/aldipower/followers","following_url":"https://api.github.com/users/aldipower/following{/other_user}","gists_url":"https://api.github.com/users/aldipower/gists{/gist_id}","starred_url":"https://api.github.com/users/aldipower/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldipower/subscriptions","organizations_url":"https://api.github.com/users/aldipower/orgs","repos_url":"https://api.github.com/users/aldipower/repos","events_url":"https://api.github.com/users/aldipower/events{/privacy}","received_events_url":"https://api.github.com/users/aldipower/received_events","type":"User","site_admin":false},"body":"This handles server error responses, taking place after our own validation.\r\n\r\nTo test this you need to turn off validation and turn off transformators or manipulated transformators badly.\r\n\r\nE.g.:\r\n```javascript\r\nfunction getValidationErrorIndex(fieldId, value) {\r\n  return -1;\r\n}\r\n```\r\n```javascript\r\nfunction getTransformedField(fieldId, value) {\r\n  return value;\r\n}\r\n```\r\n```javascript\r\nconst AppFormTransforms = {\r\n  cpus: (value) => \"xxx\",\r\n```\r\n\r\nThere are different responses from the server.\r\n\r\nSometimes with helpful messages, stored in ```response.errors``` (AppFormStore.js:116):\r\n![errors4](https://cloud.githubusercontent.com/assets/859154/9788270/be7f28ec-57c8-11e5-99f2-67fc70967b16.png)\r\n\r\nBut there are also not so helpful messages stored in ```response.details``` (AppFormStore.js:135), named: ```error.pattern```, ```error.expected.jsarray``` and so on.\r\nIt would be nice to map these to something human readable.\r\n@aquamatthias Could somebody provide us with a list of these _placeholders_?\r\n\r\n![errors1](https://cloud.githubusercontent.com/assets/859154/9788313/3142bdb2-57c9-11e5-8fd1-92a0a65989ef.png)\r\n![errors3](https://cloud.githubusercontent.com/assets/859154/9788319/367bfb68-57c9-11e5-8fe7-8d7f875c4fc1.png)\r\n\r\nAnd of course there are general errors too:\r\n![errors2](https://cloud.githubusercontent.com/assets/859154/9788326/469305a0-57c9-11e5-9e6e-d6580151a344.png)\r\n\r\n","created_at":"2015-09-10T12:39:36Z","updated_at":"2015-09-11T12:21:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4ff4ed4a69639d51ee6e1a0491c392d2808c22c4","assignee":{"login":"pierlo-upitup","id":1078545,"avatar_url":"https://avatars.githubusercontent.com/u/1078545?v=3","gravatar_id":"","url":"https://api.github.com/users/pierlo-upitup","html_url":"https://github.com/pierlo-upitup","followers_url":"https://api.github.com/users/pierlo-upitup/followers","following_url":"https://api.github.com/users/pierlo-upitup/following{/other_user}","gists_url":"https://api.github.com/users/pierlo-upitup/gists{/gist_id}","starred_url":"https://api.github.com/users/pierlo-upitup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierlo-upitup/subscriptions","organizations_url":"https://api.github.com/users/pierlo-upitup/orgs","repos_url":"https://api.github.com/users/pierlo-upitup/repos","events_url":"https://api.github.com/users/pierlo-upitup/events{/privacy}","received_events_url":"https://api.github.com/users/pierlo-upitup/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mesosphere/marathon-ui/pulls/199/commits","review_comments_url":"https://api.github.com/repos/mesosphere/marathon-ui/pulls/199/comments","review_comment_url":"https://api.github.com/repos/mesosphere/marathon-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mesosphere/marathon-ui/issues/199/comments","statuses_url":"https://api.github.com/repos/mesosphere/marathon-ui/statuses/2f486ed85ef2b4d6139f8384552cfc0febc86d4e","head":{"label":"mesosphere:2105-server-errors","ref":"2105-server-errors","sha":"2f486ed85ef2b4d6139f8384552cfc0febc86d4e","user":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":36859608,"name":"marathon-ui","full_name":"mesosphere/marathon-ui","owner":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mesosphere/marathon-ui","description":"The web-ui for Marathon (https://github.com/mesosphere/marathon)","fork":false,"url":"https://api.github.com/repos/mesosphere/marathon-ui","forks_url":"https://api.github.com/repos/mesosphere/marathon-ui/forks","keys_url":"https://api.github.com/repos/mesosphere/marathon-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesosphere/marathon-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesosphere/marathon-ui/teams","hooks_url":"https://api.github.com/repos/mesosphere/marathon-ui/hooks","issue_events_url":"https://api.github.com/repos/mesosphere/marathon-ui/issues/events{/number}","events_url":"https://api.github.com/repos/mesosphere/marathon-ui/events","assignees_url":"https://api.github.com/repos/mesosphere/marathon-ui/assignees{/user}","branches_url":"https://api.github.com/repos/mesosphere/marathon-ui/branches{/branch}","tags_url":"https://api.github.com/repos/mesosphere/marathon-ui/tags","blobs_url":"https://api.github.com/repos/mesosphere/marathon-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesosphere/marathon-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesosphere/marathon-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesosphere/marathon-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesosphere/marathon-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/mesosphere/marathon-ui/languages","stargazers_url":"https://api.github.com/repos/mesosphere/marathon-ui/stargazers","contributors_url":"https://api.github.com/repos/mesosphere/marathon-ui/contributors","subscribers_url":"https://api.github.com/repos/mesosphere/marathon-ui/subscribers","subscription_url":"https://api.github.com/repos/mesosphere/marathon-ui/subscription","commits_url":"https://api.github.com/repos/mesosphere/marathon-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesosphere/marathon-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesosphere/marathon-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesosphere/marathon-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/mesosphere/marathon-ui/contents/{+path}","compare_url":"https://api.github.com/repos/mesosphere/marathon-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesosphere/marathon-ui/merges","archive_url":"https://api.github.com/repos/mesosphere/marathon-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesosphere/marathon-ui/downloads","issues_url":"https://api.github.com/repos/mesosphere/marathon-ui/issues{/number}","pulls_url":"https://api.github.com/repos/mesosphere/marathon-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/mesosphere/marathon-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/mesosphere/marathon-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesosphere/marathon-ui/labels{/name}","releases_url":"https://api.github.com/repos/mesosphere/marathon-ui/releases{/id}","created_at":"2015-06-04T09:00:20Z","updated_at":"2015-09-02T14:53:37Z","pushed_at":"2015-09-11T11:06:56Z","git_url":"git://github.com/mesosphere/marathon-ui.git","ssh_url":"git@github.com:mesosphere/marathon-ui.git","clone_url":"https://github.com/mesosphere/marathon-ui.git","svn_url":"https://github.com/mesosphere/marathon-ui","homepage":"","size":9017,"stargazers_count":24,"watchers_count":24,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":8,"forks":11,"open_issues":8,"watchers":24,"default_branch":"master"}},"base":{"label":"mesosphere:refactor/2105-app-modals","ref":"refactor/2105-app-modals","sha":"5fde5ba1dd6291c6847e1f782105fe7160c68d07","user":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":36859608,"name":"marathon-ui","full_name":"mesosphere/marathon-ui","owner":{"login":"mesosphere","id":3458585,"avatar_url":"https://avatars.githubusercontent.com/u/3458585?v=3","gravatar_id":"","url":"https://api.github.com/users/mesosphere","html_url":"https://github.com/mesosphere","followers_url":"https://api.github.com/users/mesosphere/followers","following_url":"https://api.github.com/users/mesosphere/following{/other_user}","gists_url":"https://api.github.com/users/mesosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/mesosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesosphere/subscriptions","organizations_url":"https://api.github.com/users/mesosphere/orgs","repos_url":"https://api.github.com/users/mesosphere/repos","events_url":"https://api.github.com/users/mesosphere/events{/privacy}","received_events_url":"https://api.github.com/users/mesosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mesosphere/marathon-ui","description":"The web-ui for Marathon (https://github.com/mesosphere/marathon)","fork":false,"url":"https://api.github.com/repos/mesosphere/marathon-ui","forks_url":"https://api.github.com/repos/mesosphere/marathon-ui/forks","keys_url":"https://api.github.com/repos/mesosphere/marathon-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mesosphere/marathon-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mesosphere/marathon-ui/teams","hooks_url":"https://api.github.com/repos/mesosphere/marathon-ui/hooks","issue_events_url":"https://api.github.com/repos/mesosphere/marathon-ui/issues/events{/number}","events_url":"https://api.github.com/repos/mesosphere/marathon-ui/events","assignees_url":"https://api.github.com/repos/mesosphere/marathon-ui/assignees{/user}","branches_url":"https://api.github.com/repos/mesosphere/marathon-ui/branches{/branch}","tags_url":"https://api.github.com/repos/mesosphere/marathon-ui/tags","blobs_url":"https://api.github.com/repos/mesosphere/marathon-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mesosphere/marathon-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mesosphere/marathon-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/mesosphere/marathon-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mesosphere/marathon-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/mesosphere/marathon-ui/languages","stargazers_url":"https://api.github.com/repos/mesosphere/marathon-ui/stargazers","contributors_url":"https://api.github.com/repos/mesosphere/marathon-ui/contributors","subscribers_url":"https://api.github.com/repos/mesosphere/marathon-ui/subscribers","subscription_url":"https://api.github.com/repos/mesosphere/marathon-ui/subscription","commits_url":"https://api.github.com/repos/mesosphere/marathon-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/mesosphere/marathon-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/mesosphere/marathon-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/mesosphere/marathon-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/mesosphere/marathon-ui/contents/{+path}","compare_url":"https://api.github.com/repos/mesosphere/marathon-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mesosphere/marathon-ui/merges","archive_url":"https://api.github.com/repos/mesosphere/marathon-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mesosphere/marathon-ui/downloads","issues_url":"https://api.github.com/repos/mesosphere/marathon-ui/issues{/number}","pulls_url":"https://api.github.com/repos/mesosphere/marathon-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/mesosphere/marathon-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/mesosphere/marathon-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mesosphere/marathon-ui/labels{/name}","releases_url":"https://api.github.com/repos/mesosphere/marathon-ui/releases{/id}","created_at":"2015-06-04T09:00:20Z","updated_at":"2015-09-02T14:53:37Z","pushed_at":"2015-09-11T11:06:56Z","git_url":"git://github.com/mesosphere/marathon-ui.git","ssh_url":"git@github.com:mesosphere/marathon-ui.git","clone_url":"https://github.com/mesosphere/marathon-ui.git","svn_url":"https://github.com/mesosphere/marathon-ui","homepage":"","size":9017,"stargazers_count":24,"watchers_count":24,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":8,"forks":11,"open_issues":8,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mesosphere/marathon-ui/pulls/199"},"html":{"href":"https://github.com/mesosphere/marathon-ui/pull/199"},"issue":{"href":"https://api.github.com/repos/mesosphere/marathon-ui/issues/199"},"comments":{"href":"https://api.github.com/repos/mesosphere/marathon-ui/issues/199/comments"},"review_comments":{"href":"https://api.github.com/repos/mesosphere/marathon-ui/pulls/199/comments"},"review_comment":{"href":"https://api.github.com/repos/mesosphere/marathon-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mesosphere/marathon-ui/pulls/199/commits"},"statuses":{"href":"https://api.github.com/repos/mesosphere/marathon-ui/statuses/2f486ed85ef2b4d6139f8384552cfc0febc86d4e"}}}}