update domain docs

This commit is contained in:
Aaron Po
2026-08-04 06:18:13 -04:00
parent be0fe9d405
commit 2ed655e03d

View File

@@ -1,33 +1,31 @@
namespace Domain.Exceptions; namespace Domain.Exceptions;
/// <summary> /// <summary>
/// Exception thrown when a resource conflict occurs (e.g., duplicate username, email already in use). /// The exception that is thrown when a resource conflict occurs (e.g. duplicate username, email already
/// Maps to HTTP 409 Conflict. /// in use). Maps to HTTP 409 Conflict.
/// </summary> /// </summary>
public class ConflictException(string message) : Exception(message); public class ConflictException(string message) : Exception(message);
/// <summary> /// <summary>
/// Exception thrown when a requested resource is not found. /// The exception that is thrown when a requested resource is not found. Maps to HTTP 404 Not Found.
/// Maps to HTTP 404 Not Found.
/// </summary> /// </summary>
public class NotFoundException(string message) : Exception(message); public class NotFoundException(string message) : Exception(message);
// Domain.Exceptions/UnauthorizedException.cs // Domain.Exceptions/UnauthorizedException.cs
/// <summary> /// <summary>
/// Exception thrown when authentication fails or is required. /// The exception that is thrown when authentication fails or is required. Maps to HTTP 401 Unauthorized.
/// Maps to HTTP 401 Unauthorized.
/// </summary> /// </summary>
public class UnauthorizedException(string message) : Exception(message); public class UnauthorizedException(string message) : Exception(message);
/// <summary> /// <summary>
/// Exception thrown when a user is authenticated but lacks permission to access a resource. /// The exception that is thrown when an authenticated user lacks permission to access a resource. Maps to
/// Maps to HTTP 403 Forbidden. /// HTTP 403 Forbidden.
/// </summary> /// </summary>
public class ForbiddenException(string message) : Exception(message); public class ForbiddenException(string message) : Exception(message);
/// <summary> /// <summary>
/// Exception thrown when business rule validation fails (distinct from FluentValidation). /// The exception that is thrown when business rule validation fails (distinct from FluentValidation's
/// Maps to HTTP 400 Bad Request. /// <see cref="FluentValidation.ValidationException" />). Maps to HTTP 400 Bad Request.
/// </summary> /// </summary>
public class ValidationException(string message) : Exception(message); public class ValidationException(string message) : Exception(message);