throw exception in render for invalid model