Cursor .cursorrules: Enforce Consistent Error Handling
Generate a .cursorrules block that forces Cursor to write error handling the same way every time.
The Prompt
Free accounts also get the weekly newsletter.
Related prompts
.cursorrules: Enforce Error Handling Discipline by Layer
A drop-in .cursorrules block that makes Cursor handle errors differently at the boundary, service, and infrastructure layers.
.cursorrules: Forbid Silent Catches and Swallowed Errors
A .cursorrules block that makes Cursor refuse to write try/catch blocks that hide failure from the caller.
.cursorrules: Enforce Test-First Discipline Without the Lecture
A .cursorrules block that makes Cursor refuse to write implementation code until the test exists and fails for the right reason.
Extract Common Error Handling Anti-patterns
Find catch blocks that swallow errors, log-only failures, and missing error recovery logic across your codebase.
