Corrected error handling for ActiveModel errors