(refactor) Use operator-facing config errors

Replace remaining model-name based configuration errors with labels that
match the Django-first operating model.

Add coverage for missing global config and host configuration errors so
operator-facing messages stay readable.
This commit is contained in:
2026-05-21 02:56:00 +02:00
parent 1c8cbd96ca
commit a73d34ac9f
3 changed files with 13 additions and 4 deletions

View File

@@ -135,7 +135,7 @@ def _enabled_host_config(host: str) -> HostConfig:
try:
return HostConfig.objects.get(host=host, enabled=True)
except HostConfig.DoesNotExist as exc:
raise ConfigError(f"Missing enabled HostConfig {host!r}") from exc
raise ConfigError(f"Missing enabled host {host!r}") from exc
def _retention_for_host(host_config: HostConfig) -> dict[str, int]: