Error handling and validation .cursorrules strategies