Skip to content
Agentmart
Submit a tool

exception-handling

Use when implementing, modifying, or reviewing .NET exception handling, customer-facing API error translation, recovery boundaries, cancellation, and safe…

Skill by dprakash2101

IndexedMIT★ 4
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/dprakash2101-exception-handling

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use when implementing, modifying, or reviewing .NET exception handling, customer-facing API error translation, recovery boundaries, cancellation, and safe logging. Prevent internal details and secrets from reaching callers.

Use cases: backend, security

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/exception-handling

What's inside

Skill name
exception-handling
Description
Use when implementing, modifying, or reviewing .NET exception handling, customer-facing API error translation, recovery boundaries, cancellation, and safe logging. Prevent internal details and secrets from reaching callers.
License
MIT
Instructions
13 lines in SKILL.md · view on GitHub

Files (2)

  • SKILL.md
  • customer-facing-api.md · references/

SKILL.md (first lines)

# .NET exception handling

Follow the repository's exception taxonomy and handling boundaries. Catch only when the current layer can recover, translate to its own contract, add safe context, perform required cleanup, or make a deliberate retry decision. Otherwise allow the exception to propagate to the owning boundary.

Do not swallow failures, use `catch (Exception)` throughout the call stack, throw generic exceptions for expected domain outcomes, or use exceptions for normal control flow. Preserve the original stack with `throw;` when rethrowing. Wrap only when the new exception adds a meaningful abstraction and retain the original as `InnerException`.

Distinguish validation/domain failures, authentication/authorization, missing resources, conflicts, cancellation, timeouts, transient dependency failures, permanent dependency failures, and unexpected defects. Do not convert caller cancellation into an error. Keep cleanup exception-safe with `using`/`await using` or `finally` where ownership requires it.

Define one layer to own final exception logging. A lower layer may log a failure it fully handles or add diagnostic context, but avoid logging and rethrowing the same exception at every layer. Include the exception object in structured internal logs and keep correlation/trace identifiers.

Test recovery, propagation, translation, cleanup, and cancellation behavior at the owning boundary. For a customer-facing HTTP API, read [references/customer-facing-api.md](references/customer-facing-api.md) before designing or changing its exception mapping.

Exercise representative domain errors, cancellation, timeouts and unexpected failures at the owning boundary. Verify the external response is sanitized and the internal error event is not duplicated.

From dprakash2101/dotnet-production-agent-skills, MIT.

More from dprakash2101/dotnet-production-agent-skills

Signals

Stars
4
Forks
1
Open issues
0
Last commit (this folder)
Sep 22, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from dprakash2101

Cite this page

exception-handling skill. Agent Mart. https://agentmart.dev/skills/dprakash2101-exception-handling (last updated 2026-10-24)