ABP Exception Handling Skill

Standardize ABP Framework exception-to-payload behavior for HTTP APIs.

13|4|Updated May 27, 2026
One-click install
npx skills add https://github.com/burakdmir/abp-skills --skill abp-exception-handling-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ABP Exception Handling Skill
Source: https://github.com/burakdmir/abp-skills/tree/main/claude/abp-exception-handling
Command: npx skills add https://github.com/burakdmir/abp-skills --skill abp-exception-handling-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you design ABP Framework error handling so API consumers receive consistent, safe, and actionable error payloads instead of leaking internal failures.

Core Features & Use Cases

  • Standardized RemoteServiceErrorResponse: Produces the expected JSON error shape for API/AJAX requests, including optional error codes and details.
  • Code, details, validation, and localization support: Guides implementing IHasErrorCode, IHasErrorDetails, and using AbpValidationException for structured validationErrors, plus localized messages for user-friendly output.
  • Correct HTTP status mapping + customization: Explains ABP’s default exception-to-status mapping and how to override it via AbpExceptionHandlingOptions.
  • Logging controls and self-logging: Covers automatic logging behavior, IHasLogLevel, and IExceptionWithSelfLogging for additional contextual logs without exposing sensitive data.

Quick Start

Ask your agent to explain and implement ABP exception handling for your API so RemoteServiceErrorResponse includes error codes and validation errors, maps exceptions to the right HTTP statuses, and avoids leaking stack traces in production.

Frequently Asked Questions about ABP Exception Handling Skill

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

FAQPage Schema
How do I standardize ABP exception handling to return consistent RemoteServiceErrorResponse JSON payloads?

ABP exception handling standardizes API error responses by formatting RemoteServiceErrorResponse payloads to include error codes, details, and validation errors. Implementing interfaces like IHasErrorCode and IHasErrorDetails ensures API consumers receive safe, consistent JSON errors.

How do I map ABP business exceptions to the correct HTTP status codes?

HTTP status mapping in ABP assigns specific status codes to exceptions using default framework rules. You can override these defaults and map custom business exceptions to specific HTTP statuses by configuring AbpExceptionHandlingOptions with custom exception mappers.

How do I structure validation errors in ABP Framework API responses?

Validation errors in ABP API responses are structured using AbpValidationException to generate a detailed validationErrors array. This mechanism provides actionable field-level validation feedback within the standard RemoteServiceErrorResponse payload.

How can I control exception logging in ABP to prevent leaking sensitive stack traces in production?

ABP exception logging is controlled using IHasLogLevel and IExceptionWithSelfLogging to capture contextual data without exposing sensitive stack traces. This approach ensures secure logging behavior while preventing internal failure leakage in production environments.

Does ABP Framework support adding localized error messages to API exception responses?

ABP Framework API exception responses support localized messages to provide user-friendly error output. By configuring the exception handling pipeline, you can return translated error details safely within the RemoteServiceErrorResponse payload structure.

What is the best way to implement custom exception mappers in ABP Framework?

Custom exception mappers in ABP Framework are implemented by configuring AbpExceptionHandlingOptions to intercept specific exceptions. This approach overrides default exception-to-status mapping to return tailored HTTP codes and safe error payloads for business exceptions.