Table of Contents

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

string

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

string

Canceled

The operation was canceled.

public const string Canceled = "OPERATION_CANCELED"

Field Value

string

CapacityExceeded

The resource has reached its maximum capacity.

public const string CapacityExceeded = "CAPACITY_EXCEEDED"

Field Value

string

CheckViolation

A check constraint was violated.

public const string CheckViolation = "CHECK_VIOLATION"

Field Value

string

DatabaseError

A generic database error occurred.

public const string DatabaseError = "DATABASE_ERROR"

Field Value

string

DuplicateReplay

The operation was rejected because the incoming version equals the persisted version (duplicate replay).

public const string DuplicateReplay = "DUPLICATE_REPLAY"

Field Value

string

Forbidden

Access to the resource is forbidden (banned, unauthorized, etc.).

public const string Forbidden = "FORBIDDEN"

Field Value

string

ForeignKeyViolation

A foreign key constraint was violated.

public const string ForeignKeyViolation = "FOREIGN_KEY_VIOLATION"

Field Value

string

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

string

InvalidArgument

An argument passed to a method was invalid.

public const string InvalidArgument = "INVALID_ARGUMENT"

Field Value

string

InvalidConfiguration

Configuration is invalid or missing.

public const string InvalidConfiguration = "INVALID_CONFIGURATION"

Field Value

string

InvalidOperation

The requested operation is not valid in the current state.

public const string InvalidOperation = "INVALID_OPERATION"

Field Value

string

MaxRetries

Maximum retry attempts exceeded for transient failures.

public const string MaxRetries = "MAX_RETRIES"

Field Value

string

NotFound

The requested entity was not found in the database.

public const string NotFound = "NOT_FOUND"

Field Value

string

NotNullViolation

A not-null constraint was violated.

public const string NotNullViolation = "NOT_NULL_VIOLATION"

Field Value

string

ObjectDisposed

The object has already been disposed.

public const string ObjectDisposed = "OBJECT_DISPOSED"

Field Value

string

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

string

RollbackFailed

Transaction rollback failed after an operation error.

public const string RollbackFailed = "ROLLBACK_FAILED"

Field Value

string

StaleState

Optimistic concurrency conflict - the entity version is stale.

public const string StaleState = "STALE_STATE"

Field Value

string

UniqueViolation

A unique constraint was violated.

public const string UniqueViolation = "UNIQUE_VIOLATION"

Field Value

string

ValidationError

Input validation failed (invalid length, format, null/empty, etc.).

public const string ValidationError = "VALIDATION_ERROR"

Field Value

string