Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't ignore all exceptions during coercion for nullable fields
Only ignore exceptions if a value for a nullable field is not null. Previously all exceptions during custom coerction were ignored with nullable fields. The developer and/or user most likely wants to know about exceptions that happen during coercion - this leads to hard to debug problems otherwise. The purpose of the `e is not TypeError` condition was unclear. As far as I know this condition can never be false (`e` is an instance of an exception, not an exception class). I think this is still in line with the original intent of this code, which was to make common coercions like `float` work with nullable fields out of the box: #269
- Loading branch information