# errors.MODEL_ALREADY_LOCKED

## NAME

MODEL_ALREADY_LOCKED — an admin operation requested the model be in the `UNLOCKED` state, but the model is already `LOCKED`.

## SYNOPSIS

HTTP: `409` `Conflict`. Retryable: `no`.

## DESCRIPTION

Returned by any admin operation that requires the model be in the `UNLOCKED` state, including:

- `POST /model/{name}/{version}/lock` — the relock is rejected because the model is already locked.
- Re-importing a model whose existing descriptor is already `LOCKED`.

The problem-detail body carries `entityName` and `entityVersion` on every emit; the relock branch additionally sets `expectedState` (always `UNLOCKED`) and `actualState` (always `LOCKED`) so callers can branch on the precondition without scraping the message string.

Not retryable. To proceed, either accept the existing lock or unlock the model first via `POST /model/{name}/{version}/unlock`.

## SEE ALSO

- errors
- errors.MODEL_NOT_FOUND
- errors.MODEL_NOT_LOCKED
- errors.CONFLICT
