Creado apartir del commit b888de6c92056de294456f581a56e25e734d4ab7 de develop

This commit is contained in:
jrojas
2026-06-26 09:52:35 +02:00
commit 319fd3dfb0
746 changed files with 106610 additions and 0 deletions
+242
View File
@@ -0,0 +1,242 @@
namespace adas_core.Domain.Enums;
public static class HttpEnum
{
/// <summary>
/// Enumeration for HTTP error code messages.
/// </summary>
public enum ErrorMessage
{
#region 200 OK
/// <summary>
/// The update could not be completed because the resource has not been modified.
/// </summary>
OkResouceNotModified = 2001,
#endregion
#region 400 Bad Request
/// <summary>
/// Required parameters are missing from the request.
/// </summary>
BadRequestMissingParameters = 4001,
/// <summary>
/// The format of the provided data is invalid.
/// </summary>
BadRequestInvalidFormat = 4002,
/// <summary>
/// The submitted data contains duplicate values that are not allowed.
/// </summary>
BadRequestDuplicateData = 4003,
/// <summary>
/// Username already exists.
/// </summary>
BadRequestInvalidUsername = 4004,
/// <summary>
/// Email already exists.
/// </summary>
BadRequestInvalidEmail = 4005,
/// <summary>
/// Incorrect type.
/// </summary>
BadRequestIncorrectType = 4006,
/// <summary>
/// Incorrect length.
/// </summary>
BadRequestIncorrectLength = 4007,
/// <summary>
/// Invalid username or email.
/// </summary>
BadRequestIncorrectEmailOrUsername = 4008,
#endregion
#region 401 Unauthorized
/// <summary>
/// The access token has expired.
/// </summary>
UnauthorizedTokenExpired = 4011,
/// <summary>
/// The user does not have permission to perform this action.
/// </summary>
UnauthorizedNoPermission = 4012,
/// <summary>
/// The authentication token is invalid or has been revoked.
/// </summary>
UnauthorizedInvalidToken = 4013,
/// <summary>
/// User not registered.
/// </summary>
UnauthorizedUserNotRegistered = 4014,
/// <summary>
/// Invalid user credentials.
/// </summary>
UnauthorizedInvalidCredentials = 4015,
#endregion
#region 403 Forbidden
/// <summary>
/// User does not have access to this resource.
/// </summary>
ForbiddenNoAccess = 4031,
/// <summary>
/// User does not have permission to perform this operation.
/// </summary>
ForbiddenNoPermission = 4032,
/// <summary>
/// Access is restricted due to security configurations.
/// </summary>
ForbiddenRestrictedAccess = 4033,
/// <summary>
/// User is blocked or disabled.
/// </summary>
ForbiddenUserBlocked = 4034,
#endregion
#region 404 Not Found
/// <summary>
/// The requested resource does not exist.
/// </summary>
NotFoundResourceMissing = 4041,
/// <summary>
/// No items matching the search criteria were found.
/// </summary>
NotFoundNoMatches = 4042,
#endregion
#region 409 Conflict
/// <summary>
/// The update could not be completed.
/// </summary>
ConflictUpdateFailed = 4091,
/// <summary>
/// The deletion could not be completed.
/// </summary>
ConflictDeleteFailed = 4092,
/// <summary>
/// The deletion could not be completed because the resource is in use.
/// </summary>
ConflictResourceInUse = 4093,
/// <summary>
/// The resource already exists and cannot be duplicated.
/// </summary>
ConflictResourceAlreadyExists = 4094,
/// <summary>
/// The current state of the resource prevents this operation.
/// </summary>
ConflictInvalidResourceState = 4095,
/// <summary>
/// The creation could not be completed.
/// </summary>
ConflictCreationFailed = 4096,
/// <summary>
/// Operation could not be completed.
/// </summary>
ConflictOperationIncompleted = 4097,
#endregion
#region 422 Unprocessable Entity
/// <summary>
/// One or more fields do not meet the required validations.
/// </summary>
UnprocessableEntityInvalidFields = 4221,
/// <summary>
/// The resource cannot be processed.
/// </summary>
UnprocessableEntityCannotProcess = 4222,
/// <summary>
/// The provided value is outside the allowed range.
/// </summary>
UnprocessableEntityOutOfRange = 4223,
/// <summary>
/// The password is not strong enough.
/// </summary>
UnprocessableEntityInvalidPassword = 4224,
/// <summary>
/// The current password is incorrect, or the new password does not meet the required format. Please check and try
/// again.
/// </summary>
BadRequestIncorrectPassword = 4225,
#endregion
#region 500 Internal Server Error
/// <summary>
/// An unexpected error occurred while processing the request.
/// </summary>
InternalServerErrorUnexpected = 5001,
/// <summary>
/// The service could not complete the operation due to an internal failure.
/// </summary>
InternalServerErrorInternalFailure = 5002,
/// <summary>
/// Error communicating with an external service.
/// </summary>
InternalServerErrorExternalServiceError = 5003,
#endregion
#region 503 Service Unavailable
/// <summary>
/// The service is under maintenance. Please try again later.
/// </summary>
ServiceUnavailableUnderMaintenance = 5031,
/// <summary>
/// The system is experiencing high load. Please try again later.
/// </summary>
ServiceUnavailableHighLoad = 5032,
/// <summary>
/// The data service is temporarily unavailable.
/// </summary>
ServiceUnavailableDataServiceUnavailable = 5033,
/// <summary>
/// Action is temporarily unavailable.
/// </summary>
ServiceUnavailableCensusInAutomaticMode = 5034
#endregion
}
}