This commit implements a complete rebranding of the project: - Updated all namespaces from `DocumentOperator` to `DocumentService`. - Renamed file paths, embedded resources, and test data references. - Updated configuration keys, logging paths, and Redis instance names. - Revised documentation to reflect the new project name. - Modified project and solution files to align with the new structure. - Updated class names, DTOs, commands, queries, and handlers. - Adjusted middleware, controllers, and API endpoints. - Updated Swagger metadata and API titles to `DocumentService API`. - Refactored test namespaces, resource paths, and embedded resources. - Updated build and deployment configurations for the new name. - Replaced all references to `DocumentOperator` in comments and literals. These changes ensure consistency across the codebase and documentation.
29 lines
945 B
C#
29 lines
945 B
C#
namespace DocumentService.Domain.Common.Exceptions;
|
|
|
|
/// <summary>
|
|
/// Exception thrown when domain validation fails (e.g., invalid Value Objects).
|
|
/// Maps to HTTP 400 Bad Request in the API layer.
|
|
/// </summary>
|
|
[Obsolete("This exception is deprecated. Use more specific exceptions for domain validation errors.")]
|
|
public class DomainValidationException : DomainException
|
|
{
|
|
public string PropertyName { get; }
|
|
|
|
public DomainValidationException(string message)
|
|
: base(message, "DOMAIN_VALIDATION_ERROR")
|
|
{
|
|
PropertyName = string.Empty;
|
|
}
|
|
|
|
public DomainValidationException(string propertyName, string message)
|
|
: base(message, "DOMAIN_VALIDATION_ERROR")
|
|
{
|
|
PropertyName = propertyName;
|
|
}
|
|
|
|
public DomainValidationException(string message, Exception innerException)
|
|
: base(message, "DOMAIN_VALIDATION_ERROR", innerException)
|
|
{
|
|
PropertyName = string.Empty;
|
|
}
|
|
} |