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
AlreadyMember
The character already belongs to the group it is asking to join (a guild, for instance) — distinct from AlreadyExists, which means the REQUEST itself is a duplicate, so a caller can tell "you are already in" from "you already asked".
public const string AlreadyMember = "ALREADY_MEMBER"
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
InUse
The resource cannot be removed because something still depends on it (a guild rank that members still hold, say). Its own code so it is never confused with a ValidationError in the request itself.
public const string InUse = "IN_USE"
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
QuotaExceeded
The requester has reached a per-requester limit (outstanding applications, say) — distinct from CapacityExceeded, which is the TARGET being full, because the two ask the player to do different things.
public const string QuotaExceeded = "QUOTA_EXCEEDED"
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"