{"action":"created","issue":{"url":"https://api.github.com/repos/liqd/aula/issues/299","repository_url":"https://api.github.com/repos/liqd/aula","labels_url":"https://api.github.com/repos/liqd/aula/issues/299/labels{/name}","comments_url":"https://api.github.com/repos/liqd/aula/issues/299/comments","events_url":"https://api.github.com/repos/liqd/aula/issues/299/events","html_url":"https://github.com/liqd/aula/pull/299","id":143294644,"number":299,"title":"WIP 404","user":{"login":"np","id":5548,"avatar_url":"https://avatars.githubusercontent.com/u/5548?v=3","gravatar_id":"","url":"https://api.github.com/users/np","html_url":"https://github.com/np","followers_url":"https://api.github.com/users/np/followers","following_url":"https://api.github.com/users/np/following{/other_user}","gists_url":"https://api.github.com/users/np/gists{/gist_id}","starred_url":"https://api.github.com/users/np/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/np/subscriptions","organizations_url":"https://api.github.com/users/np/orgs","repos_url":"https://api.github.com/users/np/repos","events_url":"https://api.github.com/users/np/events{/privacy}","received_events_url":"https://api.github.com/users/np/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/liqd/aula/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"np","id":5548,"avatar_url":"https://avatars.githubusercontent.com/u/5548?v=3","gravatar_id":"","url":"https://api.github.com/users/np","html_url":"https://github.com/np","followers_url":"https://api.github.com/users/np/followers","following_url":"https://api.github.com/users/np/following{/other_user}","gists_url":"https://api.github.com/users/np/gists{/gist_id}","starred_url":"https://api.github.com/users/np/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/np/subscriptions","organizations_url":"https://api.github.com/users/np/orgs","repos_url":"https://api.github.com/users/np/repos","events_url":"https://api.github.com/users/np/events{/privacy}","received_events_url":"https://api.github.com/users/np/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2016-03-24T16:30:39Z","updated_at":"2016-03-29T09:33:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/liqd/aula/pulls/299","html_url":"https://github.com/liqd/aula/pull/299","diff_url":"https://github.com/liqd/aula/pull/299.diff","patch_url":"https://github.com/liqd/aula/pull/299.patch"},"body":"This is unfinished and here such that we don't loose track of it. The main question becomes should be the persistent layer have exceptions or should we mark explicitly the exceptions with (Maybe, Either) on a per-function basis."},"comment":{"url":"https://api.github.com/repos/liqd/aula/issues/comments/202804104","html_url":"https://github.com/liqd/aula/pull/299#issuecomment-202804104","issue_url":"https://api.github.com/repos/liqd/aula/issues/299","id":202804104,"user":{"login":"andorp","id":3465327,"avatar_url":"https://avatars.githubusercontent.com/u/3465327?v=3","gravatar_id":"","url":"https://api.github.com/users/andorp","html_url":"https://github.com/andorp","followers_url":"https://api.github.com/users/andorp/followers","following_url":"https://api.github.com/users/andorp/following{/other_user}","gists_url":"https://api.github.com/users/andorp/gists{/gist_id}","starred_url":"https://api.github.com/users/andorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andorp/subscriptions","organizations_url":"https://api.github.com/users/andorp/orgs","repos_url":"https://api.github.com/users/andorp/repos","events_url":"https://api.github.com/users/andorp/events{/privacy}","received_events_url":"https://api.github.com/users/andorp/received_events","type":"User","site_admin":false},"created_at":"2016-03-29T09:33:37Z","updated_at":"2016-03-29T09:33:37Z","body":"I agree with the points above. I have a strong opinion on software architectures, which is based on modules and boundaries of modules. In this case I would create and ADT with constructors like:\r\n\r\n````haskell\r\ndata PersistEx\r\n  = NotFound (forall a . AUID a)\r\n  | Exception SomeException \r\n````\r\n\r\nOf course there is a question, if the natural transformation from `Persist ~> Action` should react on the exception transforming to `Perist ~> ExceptT Action` or just silently handle some special cases and re-throw others, in which case the natural transformation would stay `Persist ~> Action` I don't have a strong opinion here.\r\n\r\nThe question here we need to answer: Do we want to implement error case handling in the client code that uses the Action/Persist functionality? Eg: Rendering different page snippets if one of the entities were not found, or do we handle errors only in the action handling, showing error pages to the users?\r\n\r\n@np had a good point in the morning call. There is a need for investigation on this point."}}