{"action":"opened","issue":{"url":"https://api.github.com/repos/CartoDB/cartodb/issues/10391","repository_url":"https://api.github.com/repos/CartoDB/cartodb","labels_url":"https://api.github.com/repos/CartoDB/cartodb/issues/10391/labels{/name}","comments_url":"https://api.github.com/repos/CartoDB/cartodb/issues/10391/comments","events_url":"https://api.github.com/repos/CartoDB/cartodb/issues/10391/events","html_url":"https://github.com/CartoDB/cartodb/issues/10391","id":185414664,"number":10391,"title":"Handle Invalid analysis (and other analysis creation errors)","user":{"login":"jgoizueta","id":5909,"avatar_url":"https://avatars.githubusercontent.com/u/5909?v=3","gravatar_id":"","url":"https://api.github.com/users/jgoizueta","html_url":"https://github.com/jgoizueta","followers_url":"https://api.github.com/users/jgoizueta/followers","following_url":"https://api.github.com/users/jgoizueta/following{/other_user}","gists_url":"https://api.github.com/users/jgoizueta/gists{/gist_id}","starred_url":"https://api.github.com/users/jgoizueta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgoizueta/subscriptions","organizations_url":"https://api.github.com/users/jgoizueta/orgs","repos_url":"https://api.github.com/users/jgoizueta/repos","events_url":"https://api.github.com/users/jgoizueta/events{/privacy}","received_events_url":"https://api.github.com/users/jgoizueta/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CartoDB/cartodb/labels/Builder","name":"Builder","color":"207de5"},{"url":"https://api.github.com/repos/CartoDB/cartodb/labels/UI","name":"UI","color":"e102d8"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-26T14:44:12Z","updated_at":"2016-10-26T14:44:12Z","closed_at":null,"body":"If an analysis is not valid or an error occurs while creating it (prior to registration, execution, etc.) no error appears in the UI. The analysis is left with the progress icon. (we cannot easily generate this situation currently before tampering with the code, so this is not a bug, but please keep reading 😬 )\r\n\r\nThese are cases in which the map instantiation (GET `.../api/v1/map?config=...`) responds with a 200 and this kind of payload:\r\n\r\n```json\r\n{\r\n  \"errors\": [\r\n    \"Invalid analysis, cycle found\"\r\n  ],\r\n  \"errors_with_context\": [\r\n    {\r\n      \"type\": \"analysis\",\r\n      \"message\": \"Invalid analysis, cycle found\",\r\n      \"analysis\": {\r\n        \"id\": \"a1\",\r\n        \"type\": \"filter-category\"\r\n      }\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\nThis may seem not very important for the invalid analysis case (because the UI should not allow building an invalid analysis in the first place) but other errors may occur during the analysis creation, and in particular we're working in [pre-checking the analyses](https://github.com/CartoDB/camshaft/issues/209) and this seems like a good way to make them fail if they limits are exceeded.\r\n\r\ncc/ @rafatower "}}
{"actor":{"display_login":"jgoizueta"}}