Commit a8ae0aba authored by Christophe Benz's avatar Christophe Benz
Browse files

Contextualize error when loading homepage config file

parent d47d1dd4
......@@ -38,7 +38,12 @@ HOMEPAGE_CONFIG = None
if HOMEPAGE_CONFIG_FILE:
HOMEPAGE_CONFIG_FILE = Path(HOMEPAGE_CONFIG_FILE)
with HOMEPAGE_CONFIG_FILE.open() as fd:
try:
HOMEPAGE_CONFIG = json.load(fd)
except ValueError as exc:
raise ValueError(
f"Could not load homepage config JSON file {HOMEPAGE_CONFIG_FILE}"
) from exc
MATOMO_BASE_URL = os.getenv("MATOMO_BASE_URL") or None
if MATOMO_BASE_URL:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment