{"action":"created","issue":{"url":"https://api.github.com/repos/MountainRoseHerbs/spree/issues/59","labels_url":"https://api.github.com/repos/MountainRoseHerbs/spree/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/MountainRoseHerbs/spree/issues/59/comments","events_url":"https://api.github.com/repos/MountainRoseHerbs/spree/issues/59/events","html_url":"https://github.com/MountainRoseHerbs/spree/pull/59","id":76136285,"number":59,"title":"Kill exception shadowing in API","user":{"login":"mbj","id":117966,"avatar_url":"https://avatars.githubusercontent.com/u/117966?v=3","gravatar_id":"","url":"https://api.github.com/users/mbj","html_url":"https://github.com/mbj","followers_url":"https://api.github.com/users/mbj/followers","following_url":"https://api.github.com/users/mbj/following{/other_user}","gists_url":"https://api.github.com/users/mbj/gists{/gist_id}","starred_url":"https://api.github.com/users/mbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbj/subscriptions","organizations_url":"https://api.github.com/users/mbj/orgs","repos_url":"https://api.github.com/users/mbj/repos","events_url":"https://api.github.com/users/mbj/events{/privacy}","received_events_url":"https://api.github.com/users/mbj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/MountainRoseHerbs/spree/labels/bug","name":"bug","color":"f7c6c7"}],"state":"open","locked":false,"assignee":{"login":"mbj","id":117966,"avatar_url":"https://avatars.githubusercontent.com/u/117966?v=3","gravatar_id":"","url":"https://api.github.com/users/mbj","html_url":"https://github.com/mbj","followers_url":"https://api.github.com/users/mbj/followers","following_url":"https://api.github.com/users/mbj/following{/other_user}","gists_url":"https://api.github.com/users/mbj/gists{/gist_id}","starred_url":"https://api.github.com/users/mbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbj/subscriptions","organizations_url":"https://api.github.com/users/mbj/orgs","repos_url":"https://api.github.com/users/mbj/repos","events_url":"https://api.github.com/users/mbj/events{/privacy}","received_events_url":"https://api.github.com/users/mbj/received_events","type":"User","site_admin":false},"milestone":null,"comments":6,"created_at":"2015-05-13T21:54:46Z","updated_at":"2015-05-15T00:45:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/MountainRoseHerbs/spree/pulls/59","html_url":"https://github.com/MountainRoseHerbs/spree/pull/59","diff_url":"https://github.com/MountainRoseHerbs/spree/pull/59.diff","patch_url":"https://github.com/MountainRoseHerbs/spree/pull/59.patch"},"body":"* Never rescue `Exception` without re-raising it.\r\n* Mapping `Exception` to 422 is pure evil to API client developers\r\n* Changes to rescue domain specific exceptions, while letting unexpected\r\n  exceptions from *real* bugs pass through higher levels where *sane*\r\n  developers/operators will have real monitoring available, just logging the\r\n  error awayand mapping to 4xx range is not healthy\r\n* Fixes all specs that had been silently failing because of unexpected\r\n  exceptions and the mapping to 422 whithout any other kind of\r\n  expectation signalling the failure to rspec."},"comment":{"url":"https://api.github.com/repos/MountainRoseHerbs/spree/issues/comments/102210773","html_url":"https://github.com/MountainRoseHerbs/spree/pull/59#issuecomment-102210773","issue_url":"https://api.github.com/repos/MountainRoseHerbs/spree/issues/59","id":102210773,"user":{"login":"mbj","id":117966,"avatar_url":"https://avatars.githubusercontent.com/u/117966?v=3","gravatar_id":"","url":"https://api.github.com/users/mbj","html_url":"https://github.com/mbj","followers_url":"https://api.github.com/users/mbj/followers","following_url":"https://api.github.com/users/mbj/following{/other_user}","gists_url":"https://api.github.com/users/mbj/gists{/gist_id}","starred_url":"https://api.github.com/users/mbj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbj/subscriptions","organizations_url":"https://api.github.com/users/mbj/orgs","repos_url":"https://api.github.com/users/mbj/repos","events_url":"https://api.github.com/users/mbj/events{/privacy}","received_events_url":"https://api.github.com/users/mbj/received_events","type":"User","site_admin":false},"created_at":"2015-05-15T00:45:11Z","updated_at":"2015-05-15T00:45:11Z","body":"> Mapping Exception to 422 is pure evil to API client developers\r\n\r\nThis was more meant from a debugging perspective. If I where developing a client, and send a totally valid, not intentional harmful payload. But the service internally crashes and I get back a 4xx response for a server side crash: I'd waste tons of hours trying to find a bug on my side."}}