{"action":"closed","issue":{"url":"https://api.github.com/repos/jilen/play-circe/issues/9","repository_url":"https://api.github.com/repos/jilen/play-circe","labels_url":"https://api.github.com/repos/jilen/play-circe/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/jilen/play-circe/issues/9/comments","events_url":"https://api.github.com/repos/jilen/play-circe/issues/9/events","html_url":"https://github.com/jilen/play-circe/issues/9","id":177950881,"number":9,"title":"see faulty JSON when decode fails?","user":{"login":"hgoldwire","id":476796,"avatar_url":"https://avatars.githubusercontent.com/u/476796?v=3","gravatar_id":"","url":"https://api.github.com/users/hgoldwire","html_url":"https://github.com/hgoldwire","followers_url":"https://api.github.com/users/hgoldwire/followers","following_url":"https://api.github.com/users/hgoldwire/following{/other_user}","gists_url":"https://api.github.com/users/hgoldwire/gists{/gist_id}","starred_url":"https://api.github.com/users/hgoldwire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hgoldwire/subscriptions","organizations_url":"https://api.github.com/users/hgoldwire/orgs","repos_url":"https://api.github.com/users/hgoldwire/repos","events_url":"https://api.github.com/users/hgoldwire/events{/privacy}","received_events_url":"https://api.github.com/users/hgoldwire/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-20T02:57:26Z","updated_at":"2016-11-10T02:55:44Z","closed_at":"2016-11-10T02:55:44Z","body":"Hi peeps,\n\nI'm blessed with very, um, fluid clients that often generate wrong JSON bodies for API requests, and I spend too much time realizing and then demonstrating this, mostly using sledgehammers like ngrep.\n\nCirce decoder errors like \"Attempt to decode value on failed cursor: El(DownField(whatever),false,false)]]\" tells me what field failed but not enough about why.  I've been mucking around looking for a play-circe-friendly way to log the original request body when decoding fails, but I'm stumped.  BodyParsers seem to bail the moment they fail and I can't find a reasonable way to see the request body by composing actions, adding filters, etc.\n\nIn my dreams I glue a Logger.error of the json string onto https://github.com/jilen/play-circe/blob/master/src/main/scala/play/api/libs/circe/Circe.scala line 36 but I can't figure out how to do it short of forking the whole thing and then I lose out on mooching off your efforts.  :)  Any thoughts?  \n\nThanks!\n- Henry\n"}}
{"actor":{"display_login":"jilen"}}