refactoring CustomEntityConverter to allow the external handling of failures