package engineversion // Stable error codes returned alongside service-level errors. The values // match the vocabulary frozen by `gamemaster/README.md §Error Model` and // `gamemaster/api/internal-openapi.yaml`. The handler layer (Stage 19) // maps the wrapped sentinel error to one of these codes; tests compare // against the constant. const ( // ErrorCodeInvalidRequest reports that the request envelope failed // structural validation (empty required fields, malformed JSON // options, malformed semver, malformed Docker reference, partial // Update with no fields set, unsupported status enum). ErrorCodeInvalidRequest = "invalid_request" // ErrorCodeConflict reports that an Insert was rejected because a // row with the same `version` already exists. ErrorCodeConflict = "conflict" // ErrorCodeEngineVersionNotFound reports that the requested // version is not present in the registry. Returned by Get, // Update, Deprecate, Delete, and ResolveImageRef. ErrorCodeEngineVersionNotFound = "engine_version_not_found" // ErrorCodeEngineVersionInUse reports that a hard-delete attempt // was rejected because the version is still referenced by a // non-finished `runtime_records` row. ErrorCodeEngineVersionInUse = "engine_version_in_use" // ErrorCodeServiceUnavailable reports that a steady-state // dependency (PostgreSQL) was unreachable for this call. ErrorCodeServiceUnavailable = "service_unavailable" // ErrorCodeInternal reports an unexpected error not classified by // the other codes. ErrorCodeInternal = "internal_error" )