namespace DocumentOperator.Domain.Common.Exceptions; /// /// Exception thrown when a requested resource is not found. /// Maps to HTTP 404 Not Found in the API layer. /// public class NotFoundException : DomainException { public string ResourceType { get; } public object ResourceId { get; } public NotFoundException(string resourceType, object resourceId) : base($"{resourceType} with ID '{resourceId}' was not found.", "RESOURCE_NOT_FOUND") { ResourceType = resourceType; ResourceId = resourceId; } public NotFoundException(string resourceType, object resourceId, string customMessage) : base(customMessage, "RESOURCE_NOT_FOUND") { ResourceType = resourceType; ResourceId = resourceId; } }