Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/lacymorrow/paperclip-hubWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/lacymorrow/paperclip-hub/error-handling)<a href="https://agentmods.dev/rules/lacymorrow/paperclip-hub/error-handling"><img src="https://agentmods.dev/badge/rules/lacymorrow/paperclip-hub/error-handling/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/lacymorrow/paperclip-hub/error-handling"><img src="https://agentmods.dev/badge/rules/lacymorrow/paperclip-hub/error-handling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00516 |
| Opus 5.5 | $0.00000 | $0.00206 |
| Sonnet 5.5 | $0.00000 | $0.00103 |
| Haiku 4.5 | $0.00000 | $0.00052 |
Grade A, and why
error-handling scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Error Handling Best Practices
Client-Side Errors
- Use error boundaries
- Handle async errors
- Provide user feedback
- Log errors properly
- Implement recovery
- Monitor client errors
- Document error types
Server-Side Errors
- Use proper try/catch
- Handle async errors
- Implement logging
- Return proper status
- Monitor server errors
- Regular error review
- Document procedures
API Errors
- Use proper status codes
- Return meaningful messages
- Handle validation errors
- Log API errors
- Monitor error rates
- Regular error review
- Document API errors
Webhook Errors
- Return proper HTTP status codes (200 for success, 4xx for client errors)
- Implement comprehensive try/catch blocks for webhook processing
- Log all webhook processing errors with context (but not sensitive data)
- Never expose internal error details in webhook responses
- Implement graceful degradation for non-critical webhook failures
- Handle signature verification failures appropriately
- Implement retry logic for failed webhook processing
- Set up alerts for webhook failure patterns
- Track webhook success/failure rates
- Handle duplicate webhook events gracefully
Database Errors
- Handle connection errors
- Handle query errors
- Implement retries
- Log database errors
- Monitor error patterns
- Regular error review
- Document procedures
Validation
- Validate all inputs
- Handle edge cases
- Return clear messages
- Log validation errors
- Monitor patterns
- Regular review
- Document rules
Logging
- Use proper logging levels
- Structure log messages
- Include context
- Handle sensitive data
- Monitor logs
- Regular log review
- Document patterns
Recovery
- Implement fallbacks
- Handle graceful degradation
- Provide recovery options
- Monitor recovery
- Test recovery paths
- Regular drills
- Document procedures
Monitoring
- Track error rates
- Set up alerts
- Monitor patterns
- Regular analysis
- Take action
- Document findings
- Share insights
User Experience
- Show friendly messages
- Provide clear guidance
- Handle offline states
- Support recovery
- Monitor user impact
- Regular UX review
- Document patterns
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 110 lines · 516 tokens per session scan A 09a9a7aff3ef
error-handling is a cursor rule published in the GitHub repository lacymorrow/paperclip-hub (15 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 516 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-10.
error-handling compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| error-handlinglacymorrow/paperclip-hub | Cursor rule | 15 | yesterday | MIT | A | 0 | Cursor |
| fastapi-middlewareWebDevPeterGriffin/The-VibeCode-Bible | Cursor rule | 42 | 7d ago | none | A | 91 | Cursor |
| e2e-testingelie222/inbox-zero | Cursor rule | 13k | today | none | A | 0 | Cursor |
| mcp-debugginggiantswarm/mcp-debug | Cursor rule | 38 | today | Apache-2.0 | A | 0 | Cursor |
| 1c-exchange-specificsDesko77/cursor-1c-skills | Cursor rule | 75 | 6d ago | MIT | A | 0 | Cursor |
| api-designvibestackdev/vibe-stack | Cursor rule | 8 | yesterday | MIT | A | 0 | Cursor |
| RULECacinieP/network-troubleshoot-skill | Cursor rule | 8 | 21d ago | MIT | A | 682 | Cursor |