Correctly throwing exception on validation failure only