Skip to content

Commit cde1eef

Browse files
authored
Add debug logging on errors (#2)
1 parent a134579 commit cde1eef

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

openevsehttp/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,10 @@ def send_command(self, command: str) -> tuple | None:
5959
value = requests.post(url, data=data)
6060

6161
if value.status_code == 400:
62+
_LOGGER.debug("JSON error: %s", value.text)
6263
raise ParseJSONError
6364
if value.status_code == 401:
65+
_LOGGER.debug("Authentication error: %s", value.text)
6466
raise AuthenticationError
6567

6668
if "ret" not in value.json():
@@ -80,6 +82,7 @@ def update(self) -> None:
8082
value = requests.get(url)
8183

8284
if value.status_code == 401:
85+
_LOGGER.debug("Authentication error: %s", value.text)
8386
raise AuthenticationError
8487

8588
if "/status" in url:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
PROJECT_DIR = Path(__file__).parent.resolve()
77
README_FILE = PROJECT_DIR / "README.md"
8-
VERSION = "0.1.2"
8+
VERSION = "0.1.3"
99

1010

1111
setup(

0 commit comments

Comments
 (0)