Table of Contents

Class AuditPersistenceException

Namespace
Excalibur.Compliance
Assembly
Excalibur.Compliance.Abstractions.dll

Exception thrown when an audit event cannot be durably persisted to the underlying audit store.

public sealed class AuditPersistenceException : ApiException, ISerializable
Inheritance
AuditPersistenceException
Implements
Inherited Members

Remarks

Audit logging is fail-closed: when the audit store fails, the failure is surfaced to the caller as this exception rather than being masked behind a success-shaped result. A compliance audit trail that silently drops events is worse than one that fails loudly, because callers would otherwise treat an unrecorded event as durably stored.

Callers that require availability over durability (fail-open) must catch this exception explicitly and apply their own policy (for example, queueing the event for later retry). The framework does not silently swallow audit-store failures.

Constructors

AuditPersistenceException()

Initializes a new instance of the AuditPersistenceException class.

public AuditPersistenceException()

AuditPersistenceException(string)

Initializes a new instance of the AuditPersistenceException class with a message.

public AuditPersistenceException(string message)

Parameters

message string

The error message.

AuditPersistenceException(string, Exception?)

Initializes a new instance of the AuditPersistenceException class with a message and inner exception.

public AuditPersistenceException(string message, Exception? innerException)

Parameters

message string

The error message.

innerException Exception

The underlying audit-store failure.

Properties

EventId

Gets the identifier of the audit event that failed to persist, when available.

public string? EventId { get; init; }

Property Value

string

The EventId of the unsaved audit event, or null if not known.