(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:
@@ -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]:
|
||||
|
||||
Reference in New Issue
Block a user