{"action":"created","issue":{"url":"https://api.github.com/repos/metosin/compojure-api/issues/223","repository_url":"https://api.github.com/repos/metosin/compojure-api","labels_url":"https://api.github.com/repos/metosin/compojure-api/issues/223/labels{/name}","comments_url":"https://api.github.com/repos/metosin/compojure-api/issues/223/comments","events_url":"https://api.github.com/repos/metosin/compojure-api/issues/223/events","html_url":"https://github.com/metosin/compojure-api/pull/223","id":136270770,"number":223,"title":"Include response when throwing on failed coercion","user":{"login":"timgilbert","id":94482,"avatar_url":"https://avatars.githubusercontent.com/u/94482?v=3","gravatar_id":"","url":"https://api.github.com/users/timgilbert","html_url":"https://github.com/timgilbert","followers_url":"https://api.github.com/users/timgilbert/followers","following_url":"https://api.github.com/users/timgilbert/following{/other_user}","gists_url":"https://api.github.com/users/timgilbert/gists{/gist_id}","starred_url":"https://api.github.com/users/timgilbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timgilbert/subscriptions","organizations_url":"https://api.github.com/users/timgilbert/orgs","repos_url":"https://api.github.com/users/timgilbert/repos","events_url":"https://api.github.com/users/timgilbert/events{/privacy}","received_events_url":"https://api.github.com/users/timgilbert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-25T03:56:35Z","updated_at":"2016-02-25T17:23:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/metosin/compojure-api/pulls/223","html_url":"https://github.com/metosin/compojure-api/pull/223","diff_url":"https://github.com/metosin/compojure-api/pull/223.diff","patch_url":"https://github.com/metosin/compojure-api/pull/223.patch"},"body":"The purpose of this change is to give custom exception handlers access to the planned response when a response body can't be coerced to the correct output schema.\r\n\r\nThe specific use case I've got in mind is that when response coercion fails, I'd like to log the body that my controller code was trying to return - without this I only have access to the schema-failure error messages, which can be a little opaque. I was originally planning to return just the body here, but having the entire response structure seems like it could be helpful in some cases (maybe for looking at returned content-type headers etc)."},"comment":{"url":"https://api.github.com/repos/metosin/compojure-api/issues/comments/188888924","html_url":"https://github.com/metosin/compojure-api/pull/223#issuecomment-188888924","issue_url":"https://api.github.com/repos/metosin/compojure-api/issues/223","id":188888924,"user":{"login":"timgilbert","id":94482,"avatar_url":"https://avatars.githubusercontent.com/u/94482?v=3","gravatar_id":"","url":"https://api.github.com/users/timgilbert","html_url":"https://github.com/timgilbert","followers_url":"https://api.github.com/users/timgilbert/followers","following_url":"https://api.github.com/users/timgilbert/following{/other_user}","gists_url":"https://api.github.com/users/timgilbert/gists{/gist_id}","starred_url":"https://api.github.com/users/timgilbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timgilbert/subscriptions","organizations_url":"https://api.github.com/users/timgilbert/orgs","repos_url":"https://api.github.com/users/timgilbert/repos","events_url":"https://api.github.com/users/timgilbert/events{/privacy}","received_events_url":"https://api.github.com/users/timgilbert/received_events","type":"User","site_admin":false},"created_at":"2016-02-25T17:23:16Z","updated_at":"2016-02-25T17:23:16Z","body":"Added an integration test (took me a minute to figure out the best way to test an exception handler)"}}