Error handling for failed validation