error-handling

Implement centralized exception handling with Polly retries and circuit breakers.

Updated Jan 23, 2026
One-click install
npx skills add https://github.com/jnPiyush/AI-Squad --skill error-handling-jnpiyush
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-handling
Source: https://github.com/jnPiyush/AI-Squad/tree/main/ai_squad/skills/error-handling
Command: npx skills add https://github.com/jnPiyush/AI-Squad --skill error-handling-jnpiyush

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses unhandled errors by providing centralized exception handling, consistent logging, and graceful degradation to keep systems resilient.

Core Features & Use Cases

  • Global exception handler with standardized error responses
  • Custom exception types
  • Retry policies using Polly
  • Circuit breakers for external services
  • Graceful degradation when dependencies fail

Quick Start

Configure a global exception handler, add custom exception types, and implement Polly retry and circuit-breaker policies in an ASP.NET Core app; then trigger an endpoint to verify a consistent JSON error response.

Frequently Asked Questions about error-handling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up centralized exception handling in ASP.NET Core?

Centralized exception handling in ASP.NET Core is configured by implementing a global exception handler to catch unhandled errors, log them consistently, and return standardized JSON error responses for graceful degradation.

What is the best way to implement retry policies and circuit breakers for external services?

Implementing retry policies and circuit breakers is best achieved using Polly in an ASP.NET Core application, allowing you to define custom retry logic and circuit breaker patterns to handle external service failures gracefully.

How do I return consistent error responses from a web API when dependencies fail?

Consistent error responses during dependency failures are returned by applying graceful degradation techniques and triggering custom exception types through a global exception handler to ensure reliable, standardized JSON outputs.

Can I use Polly for graceful degradation when my API dependencies become unavailable?

Yes, Polly can be used to achieve graceful degradation by configuring circuit breakers and retry policies that intercept dependency failures, preventing cascading crashes and maintaining resilient web service operations.

Why do I need custom exception types in a global exception handler?

Custom exception types are needed in a global exception handler to differentiate specific failure conditions, allowing your web service to apply targeted logging and standardized error responses rather than relying on generic unhandled errors.