Skip to main content

arolariu.Backend.Common.Exceptions

arolariu.Backend.Common​

arolariu.Backend.Common.Exceptions Namespace​

Interfaces​

IAlreadyExistsException Interface​

Refinement marker indicating the exception represents a "resource already exists" or conflict dependency-validation outcome. Mapper emits HTTP 409 Conflict.

public interface IAlreadyExistsException : arolariu.Backend.Common.Exceptions.IDependencyValidationException

Implements IDependencyValidationException

IDependencyException Interface​

Marker interface for exceptions that represent failures of an external dependency (database, downstream service, queue). Implementations map to HTTP 503 (Service Unavailable).

public interface IDependencyException

Derived
↳ IRateLimitedException

IDependencyValidationException Interface​

Marker interface for dependency-reported validation failures (resource not found, conflict, precondition failed). Implementations map to HTTP 400, 404, 409, or 412 depending on refinement markers applied.

public interface IDependencyValidationException

Derived
↳ IAlreadyExistsException
↳ IForbiddenException
↳ ILockedException
↳ INotFoundException
↳ IUnauthorizedException

IForbiddenException Interface​

Refinement marker indicating the exception represents an "authorization failure" dependency-validation outcome. Mapper emits HTTP 403 Forbidden.

public interface IForbiddenException : arolariu.Backend.Common.Exceptions.IDependencyValidationException

Implements IDependencyValidationException

ILockedException Interface​

Refinement marker indicating the exception represents a "resource locked" dependency-validation outcome (e.g., soft-deleted). Mapper emits HTTP 423 Locked.

public interface ILockedException : arolariu.Backend.Common.Exceptions.IDependencyValidationException

Implements IDependencyValidationException

INotFoundException Interface​

Refinement marker indicating the exception represents a "resource not found" dependency-validation outcome. Mapper emits HTTP 404 Not Found.

public interface INotFoundException : arolariu.Backend.Common.Exceptions.IDependencyValidationException

Implements IDependencyValidationException

IRateLimitedException Interface​

Refinement marker indicating the exception represents a "rate limited" dependency outcome. Mapper emits HTTP 429 Too Many Requests and surfaces the RetryAfter value in the retryAfterSeconds ProblemDetails extension.

public interface IRateLimitedException : arolariu.Backend.Common.Exceptions.IDependencyException

Implements IDependencyException

Properties​

IRateLimitedException.RetryAfter Property​

Gets the recommended retry-after duration surfaced via the ProblemDetails response.

System.TimeSpan RetryAfter { get; }

Property Value​

System.TimeSpan

Remarks​

Implementations return System.TimeSpan.Zero when no concrete retry hint is available; the mapper will apply a sensible default.

IServiceException Interface​

Marker interface for unexpected internal service-layer failures. Implementations map to HTTP 500 Internal Server Error.

public interface IServiceException

ITimeoutException Interface​

Marker indicating the exception represents a server-side operation timeout — the server gave up waiting on a downstream dependency. Mapper emits HTTP 504 Gateway Timeout.

public interface ITimeoutException

Remarks​

Deliberately does NOT inherit IDependencyException. The mapper's status switch is first-match; inheriting would let the IDependencyException => 503 arm claim it first.

IUnauthorizedException Interface​

Refinement marker indicating the exception represents an "authentication failure" dependency-validation outcome. Mapper emits HTTP 401 Unauthorized.

public interface IUnauthorizedException : arolariu.Backend.Common.Exceptions.IDependencyValidationException

Implements IDependencyValidationException

IValidationException Interface​

Marker interface for exceptions that represent validation failures attributable to the caller. Implementations map to HTTP 400 Bad Request.

public interface IValidationException

Remarks​

Applied to {Layer}ValidationException classes across bounded contexts. The mapper uses this marker to emit RFC 7807 ProblemDetails with status 400.

// was this page useful?