diff --git a/backend/src/overpass/overpass.py b/backend/src/overpass/overpass.py index f49b439..2bdfb66 100644 --- a/backend/src/overpass/overpass.py +++ b/backend/src/overpass/overpass.py @@ -335,8 +335,10 @@ def fill_cache(): with open(entry.path, 'r') as f: try : json_data = json.load(f) + except json.decoder.JSONDecodeError as exc : + raise Exception(f'Failed to parse file {f}') from exc except Exception as exc : - raise json.JSONDecodeError(f'Failed to parse file {f}') from exc + raise Exception(f'An unexpected error occured while parsing file {f}') from exc # Fill the cache with the query and key