Class DatabaseErrorCodes
- Namespace
- FishMMO.Database
- Assembly
- FishMMO-DB.dll
Standardized error codes for database operations across all services. Use these constants instead of inline strings to ensure consistency.
public static class DatabaseErrorCodes
- Inheritance
-
DatabaseErrorCodes
- Inherited Members
Fields
AlreadyExists
A duplicate entity already exists (unique constraint would be violated).
public const string AlreadyExists = "ALREADY_EXISTS"
Field Value
Canceled
The operation was canceled.
public const string Canceled = "OPERATION_CANCELED"
Field Value
CapacityExceeded
The resource has reached its maximum capacity.
public const string CapacityExceeded = "CAPACITY_EXCEEDED"
Field Value
CheckViolation
A check constraint was violated.
public const string CheckViolation = "CHECK_VIOLATION"
Field Value
DatabaseError
A generic database error occurred.
public const string DatabaseError = "DATABASE_ERROR"
Field Value
DuplicateReplay
The operation was rejected because the incoming version equals the persisted version (duplicate replay).
public const string DuplicateReplay = "DUPLICATE_REPLAY"
Field Value
Forbidden
Access to the resource is forbidden (banned, unauthorized, etc.).
public const string Forbidden = "FORBIDDEN"
Field Value
ForeignKeyViolation
A foreign key constraint was violated.
public const string ForeignKeyViolation = "FOREIGN_KEY_VIOLATION"
Field Value
InvalidArgument
An argument passed to a method was invalid.
public const string InvalidArgument = "INVALID_ARGUMENT"
Field Value
InvalidConfiguration
Configuration is invalid or missing.
public const string InvalidConfiguration = "INVALID_CONFIGURATION"
Field Value
InvalidOperation
The requested operation is not valid in the current state.
public const string InvalidOperation = "INVALID_OPERATION"
Field Value
MaxRetries
Maximum retry attempts exceeded for transient failures.
public const string MaxRetries = "MAX_RETRIES"
Field Value
NotFound
The requested entity was not found in the database.
public const string NotFound = "NOT_FOUND"
Field Value
NotNullViolation
A not-null constraint was violated.
public const string NotNullViolation = "NOT_NULL_VIOLATION"
Field Value
ObjectDisposed
The object has already been disposed.
public const string ObjectDisposed = "OBJECT_DISPOSED"
Field Value
RollbackFailed
Transaction rollback failed after an operation error.
public const string RollbackFailed = "ROLLBACK_FAILED"
Field Value
StaleState
Optimistic concurrency conflict - the entity version is stale.
public const string StaleState = "STALE_STATE"
Field Value
UniqueViolation
A unique constraint was violated.
public const string UniqueViolation = "UNIQUE_VIOLATION"
Field Value
ValidationError
Input validation failed (invalid length, format, null/empty, etc.).
public const string ValidationError = "VALIDATION_ERROR"