{"action":"closed","issue":{"url":"https://api.github.com/repos/timothycrosley/hug/issues/227","repository_url":"https://api.github.com/repos/timothycrosley/hug","labels_url":"https://api.github.com/repos/timothycrosley/hug/issues/227/labels{/name}","comments_url":"https://api.github.com/repos/timothycrosley/hug/issues/227/comments","events_url":"https://api.github.com/repos/timothycrosley/hug/issues/227/events","html_url":"https://github.com/timothycrosley/hug/issues/227","id":136704024,"number":227,"title":"How do I catch/handle errors?","user":{"login":"ErwinHaasnoot","id":1389269,"avatar_url":"https://avatars.githubusercontent.com/u/1389269?v=3","gravatar_id":"","url":"https://api.github.com/users/ErwinHaasnoot","html_url":"https://github.com/ErwinHaasnoot","followers_url":"https://api.github.com/users/ErwinHaasnoot/followers","following_url":"https://api.github.com/users/ErwinHaasnoot/following{/other_user}","gists_url":"https://api.github.com/users/ErwinHaasnoot/gists{/gist_id}","starred_url":"https://api.github.com/users/ErwinHaasnoot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ErwinHaasnoot/subscriptions","organizations_url":"https://api.github.com/users/ErwinHaasnoot/orgs","repos_url":"https://api.github.com/users/ErwinHaasnoot/repos","events_url":"https://api.github.com/users/ErwinHaasnoot/events{/privacy}","received_events_url":"https://api.github.com/users/ErwinHaasnoot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/timothycrosley/hug/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/timothycrosley/hug/milestones/2","html_url":"https://github.com/timothycrosley/hug/milestones/2.0.0","labels_url":"https://api.github.com/repos/timothycrosley/hug/milestones/2/labels","id":1607743,"number":2,"title":"2.0.0","description":"","creator":{"login":"timothycrosley","id":2090154,"avatar_url":"https://avatars.githubusercontent.com/u/2090154?v=3","gravatar_id":"","url":"https://api.github.com/users/timothycrosley","html_url":"https://github.com/timothycrosley","followers_url":"https://api.github.com/users/timothycrosley/followers","following_url":"https://api.github.com/users/timothycrosley/following{/other_user}","gists_url":"https://api.github.com/users/timothycrosley/gists{/gist_id}","starred_url":"https://api.github.com/users/timothycrosley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timothycrosley/subscriptions","organizations_url":"https://api.github.com/users/timothycrosley/orgs","repos_url":"https://api.github.com/users/timothycrosley/repos","events_url":"https://api.github.com/users/timothycrosley/events{/privacy}","received_events_url":"https://api.github.com/users/timothycrosley/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":25,"state":"open","created_at":"2016-02-26T10:07:57Z","updated_at":"2016-02-26T17:47:23Z","due_on":"2016-03-01T08:00:00Z","closed_at":null},"comments":1,"created_at":"2016-02-26T13:57:10Z","updated_at":"2016-02-26T17:47:23Z","closed_at":"2016-02-26T17:47:23Z","body":"Hi!\r\n\r\nThis seems like a feature that has not yet been properly documented. My API can in some situations throw custom exceptions, how do I let hug handle these errors gracefully, rather than ending up in a http 500 state?\r\n\r\nBest,\r\n\r\nErwin"}}