{"action":"closed","issue":{"url":"https://api.github.com/repos/pauljamescleary/scala-pet-store/issues/97","repository_url":"https://api.github.com/repos/pauljamescleary/scala-pet-store","labels_url":"https://api.github.com/repos/pauljamescleary/scala-pet-store/issues/97/labels{/name}","comments_url":"https://api.github.com/repos/pauljamescleary/scala-pet-store/issues/97/comments","events_url":"https://api.github.com/repos/pauljamescleary/scala-pet-store/issues/97/events","html_url":"https://github.com/pauljamescleary/scala-pet-store/issues/97","id":368260975,"node_id":"MDU6SXNzdWUzNjgyNjA5NzU=","number":97,"title":"Error Handling","user":{"login":"nolledge","id":18087177,"node_id":"MDQ6VXNlcjE4MDg3MTc3","avatar_url":"https://avatars3.githubusercontent.com/u/18087177?v=4","gravatar_id":"","url":"https://api.github.com/users/nolledge","html_url":"https://github.com/nolledge","followers_url":"https://api.github.com/users/nolledge/followers","following_url":"https://api.github.com/users/nolledge/following{/other_user}","gists_url":"https://api.github.com/users/nolledge/gists{/gist_id}","starred_url":"https://api.github.com/users/nolledge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nolledge/subscriptions","organizations_url":"https://api.github.com/users/nolledge/orgs","repos_url":"https://api.github.com/users/nolledge/repos","events_url":"https://api.github.com/users/nolledge/events{/privacy}","received_events_url":"https://api.github.com/users/nolledge/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-10-09T15:11:14Z","updated_at":"2018-10-18T06:01:12Z","closed_at":"2018-10-18T06:01:12Z","author_association":"NONE","body":"Hi,\r\nthank you very much for this project. I had to look a while before finding a 'real life' example for a functional webservice and I am glad I have found one :)\r\nCurrently I am asking myself where to put a more finegraded error handling. For example:\r\n\r\nA repository algebra defines a function like this: \r\n\r\n`def get(orderId: Long): F[Option[Order]]`\r\n\r\nIn this scenario the Option type just represents an order being present or not. But what about other errors that might occure? How would I handle network errors, constraint violations, parse errors and all of that stuff? Would you switch to an Either type? Is this part of the service layer and somehow has to be represented by the context F[_]? I am not sure where to handle those errors if, for example, I would like to return a BadGateway error instead of a generic InternalServerError."}}
{"actor":{"display_login":"nolledge"}}