{"action":"opened","issue":{"url":"https://api.github.com/repos/nikitrifonovprojects/Datebase-Access/issues/30","repository_url":"https://api.github.com/repos/nikitrifonovprojects/Datebase-Access","labels_url":"https://api.github.com/repos/nikitrifonovprojects/Datebase-Access/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/nikitrifonovprojects/Datebase-Access/issues/30/comments","events_url":"https://api.github.com/repos/nikitrifonovprojects/Datebase-Access/issues/30/events","html_url":"https://github.com/nikitrifonovprojects/Datebase-Access/issues/30","id":301372422,"number":30,"title":"Create a common way to capture exceptions triggered inside of the commands","user":{"login":"iliantrifonov","id":6658960,"avatar_url":"https://avatars3.githubusercontent.com/u/6658960?v=4","gravatar_id":"","url":"https://api.github.com/users/iliantrifonov","html_url":"https://github.com/iliantrifonov","followers_url":"https://api.github.com/users/iliantrifonov/followers","following_url":"https://api.github.com/users/iliantrifonov/following{/other_user}","gists_url":"https://api.github.com/users/iliantrifonov/gists{/gist_id}","starred_url":"https://api.github.com/users/iliantrifonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iliantrifonov/subscriptions","organizations_url":"https://api.github.com/users/iliantrifonov/orgs","repos_url":"https://api.github.com/users/iliantrifonov/repos","events_url":"https://api.github.com/users/iliantrifonov/events{/privacy}","received_events_url":"https://api.github.com/users/iliantrifonov/received_events","type":"User","site_admin":false},"labels":[{"id":806399398,"url":"https://api.github.com/repos/nikitrifonovprojects/Datebase-Access/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"nikitrifonovprojects","id":26598822,"avatar_url":"https://avatars2.githubusercontent.com/u/26598822?v=4","gravatar_id":"","url":"https://api.github.com/users/nikitrifonovprojects","html_url":"https://github.com/nikitrifonovprojects","followers_url":"https://api.github.com/users/nikitrifonovprojects/followers","following_url":"https://api.github.com/users/nikitrifonovprojects/following{/other_user}","gists_url":"https://api.github.com/users/nikitrifonovprojects/gists{/gist_id}","starred_url":"https://api.github.com/users/nikitrifonovprojects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikitrifonovprojects/subscriptions","organizations_url":"https://api.github.com/users/nikitrifonovprojects/orgs","repos_url":"https://api.github.com/users/nikitrifonovprojects/repos","events_url":"https://api.github.com/users/nikitrifonovprojects/events{/privacy}","received_events_url":"https://api.github.com/users/nikitrifonovprojects/received_events","type":"User","site_admin":false},"assignees":[{"login":"nikitrifonovprojects","id":26598822,"avatar_url":"https://avatars2.githubusercontent.com/u/26598822?v=4","gravatar_id":"","url":"https://api.github.com/users/nikitrifonovprojects","html_url":"https://github.com/nikitrifonovprojects","followers_url":"https://api.github.com/users/nikitrifonovprojects/followers","following_url":"https://api.github.com/users/nikitrifonovprojects/following{/other_user}","gists_url":"https://api.github.com/users/nikitrifonovprojects/gists{/gist_id}","starred_url":"https://api.github.com/users/nikitrifonovprojects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikitrifonovprojects/subscriptions","organizations_url":"https://api.github.com/users/nikitrifonovprojects/orgs","repos_url":"https://api.github.com/users/nikitrifonovprojects/repos","events_url":"https://api.github.com/users/nikitrifonovprojects/events{/privacy}","received_events_url":"https://api.github.com/users/nikitrifonovprojects/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-03-01T11:35:20Z","updated_at":"2018-03-01T11:35:20Z","closed_at":null,"author_association":"COLLABORATOR","body":"Currently, all commands have to check for exceptions coming from the Service and Repo layers. Make sure there is a unified way of doing this.\r\n\r\nWe already did something similar with other life-cycle events.\r\nIn this case, we would also want to create a custom context for exceptions, as to be able to choose if we are going to handle them or not ( we may not want to handle all exceptions in a single attribute or method).\r\nThe workflow should be:\r\nauthorization\r\nother life-cycle events\r\ncommand gets executed \r\nOnActionExecuted events are triggered.\r\nAnd if any of the above throws an exception:\r\nOnException life-cycle event gets called, with a custom ExceptionContext as a parameter, that will have all the properties of the normal context, but also have the exception as a property, and a boolean property to mark if the exception has been handled.\r\n\r\nThe idea is that after all possible OnException methods are called, if the exception is still not handled according to the boolean property, we will throw it up the chain, where it will trigger a server error.\r\n\r\nIf it is handled however, we continue as normal.\r\n\r\n"}}
{"actor":{"display_login":"iliantrifonov"}}