Mav bp error handling

From thermiteau/maverick · View interactive version

Mav bp error handling is an AI agent skill from the GitHub repository thermiteau/maverick. Error handling conventions for all applications. Covers error propagation, retry strategies, circuit breakers, graceful degradation, error boundaries, and typed errors. Applied when writing or reviewing error handling code.

How to use this skill

Skill file

Error Handling Standards

Maverick's hard rules for intentional, typed, resilient error handling.

Maverick's Rules

Project Implementation Lookup

Check for docs/maverick/skills/error-handling/SKILL.md. If present, read it — it wins on specifics (library, config, conventions). If missing, proceed with these standards and note the gap in your summary.

Detecting Error Handling Issues in Code Review

| Pattern | Issue | Fix |

| --------------------------------------------------- | ------------------------------ | ------------------------------------------------- |

| Empty catch block | Silently swallowed error | Handle, log, or re-throw |

| catch (err) { return null } | Lost error context | Propagate the error or handle explicitly |

| throw new Error("failed") | Untyped, no context | Use typed error with structured metadata |

| Retrying on 400/401/403 | Retrying permanent failures | Only retry transient errors (429, 5xx, timeouts) |

| No retry on external HTTP calls | Fragile to transient failures | Add retry with exponential backoff |

| Stack trace in API response | Leaking internals | Return safe error with request ID only |

| catch at every layer in the call stack | Duplicate handling/logging | Catch at the boundary, propagate elsewhere |

| Feature crashes app when dependency is down | No graceful degradation | Degrade the feature, keep the app running |

| No error boundary around UI sections | Single component crashes page | Wrap sections in error boundaries with fallback UI |

| Generic error message for all failures | Poor user experience | Distinguish client vs server errors |

<!-- maverick-plugin-version: 5.3.1 -->

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.