Skip to content

Commit

Permalink
refactor(json_config): add parse error message from json lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogay committed Sep 21, 2023
1 parent a6acab2 commit 7bd57c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commitizen/config/json_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def _parse_setting(self, data: bytes | str) -> None:
"""
try:
doc = json.loads(data)
except json.JSONDecodeError:
raise InvalidConfigurationError(f"Failed to parse {self.path}")
except json.JSONDecodeError as e:
raise InvalidConfigurationError(f"Failed to parse {self.path}: {e}")

try:
self.settings.update(doc["commitizen"])
Expand Down

0 comments on commit 7bd57c6

Please sign in to comment.