Handle JSONDecodeError in all load_* functions #12
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: high
Category: data-integrity
Location:
bills.py:12, sinking.py:29, mortgage.py:13, assets.py:49, debts.py:120/131, income.py:25Problem
json.loadraises on empty/corrupt files (e.g. after a partial write), and the exception propagates, crashing every route that loads data.Suggested fix
Wrap in try/except json.JSONDecodeError: log + return the default, or surface a recovery path.
Filed by automated code review.