From 2977bfffb11e619813463c319dbd21ec72da7ff1 Mon Sep 17 00:00:00 2001 From: ComputerTech Date: Tue, 31 Mar 2026 12:23:10 +0100 Subject: [PATCH] Show JSON decoding errors in production.py --- production.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/production.py b/production.py index 77f892b..fc3d64d 100644 --- a/production.py +++ b/production.py @@ -265,8 +265,10 @@ def main() -> None: try: with open(config_path, 'r') as f: config = json.load(f) - except (json.JSONDecodeError, IOError): - pass + except json.JSONDecodeError as e: + sys.exit(f"Error: Failed to parse '{config_path}': {e}\nPlease check for syntax errors (like trailing commas).") + except IOError as e: + print(f"Warning: Could not read '{config_path}': {e}") server_cfg = config.get('server', {}) default_host = server_cfg.get('host', '0.0.0.0')