{"action":"closed","issue":{"url":"https://api.github.com/repos/nicolaiarocci/cerberus/issues/171","labels_url":"https://api.github.com/repos/nicolaiarocci/cerberus/issues/171/labels{/name}","comments_url":"https://api.github.com/repos/nicolaiarocci/cerberus/issues/171/comments","events_url":"https://api.github.com/repos/nicolaiarocci/cerberus/issues/171/events","html_url":"https://github.com/nicolaiarocci/cerberus/issues/171","id":117125449,"number":171,"title":"Take control over Exceptions caught on coerce","user":{"login":"yohanboniface","id":146023,"avatar_url":"https://avatars.githubusercontent.com/u/146023?v=3","gravatar_id":"","url":"https://api.github.com/users/yohanboniface","html_url":"https://github.com/yohanboniface","followers_url":"https://api.github.com/users/yohanboniface/followers","following_url":"https://api.github.com/users/yohanboniface/following{/other_user}","gists_url":"https://api.github.com/users/yohanboniface/gists{/gist_id}","starred_url":"https://api.github.com/users/yohanboniface/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yohanboniface/subscriptions","organizations_url":"https://api.github.com/users/yohanboniface/orgs","repos_url":"https://api.github.com/users/yohanboniface/repos","events_url":"https://api.github.com/users/yohanboniface/events{/privacy}","received_events_url":"https://api.github.com/users/yohanboniface/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-11-16T13:43:44Z","updated_at":"2016-01-04T13:54:50Z","closed_at":"2016-01-04T13:54:50Z","body":"Hi,\r\n\r\nI'd like to catch more than `(ValueError, TypeError)` when running the coerce of a field (actually, `peewee.DoesNotExist` in case of a foreign key). As I'd like to use the same `coerce` method for my db fields and my schema fields, it would be very useful to be able to decide which exceptions are caught.\r\n\r\nFor example just having a Validator.COERCE_EXCEPTIONS tuple that can be overridden when inheriting from Validator.\r\n\r\nI can work on a PR, but I'd love feedback before (I may be totally missing an obvious solution or a better implementation).\r\n\r\nThanks :)"}}