Skip to content

Commit b0837bd

Browse files
bltravisbtravisebsco
authored andcommitted
Enhance debug logging in FolioAuth and improve error message in prepare_payload function
1 parent 66dc0c6 commit b0837bd

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/folioclient/FolioClient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2452,4 +2452,4 @@ def prepare_payload(payload: Dict | str) -> bytes:
24522452
elif isinstance(payload, str):
24532453
return payload.encode("utf-8")
24542454
else:
2455-
raise TypeError("Payload must be a dictionary or a string.")
2455+
raise TypeError(f"Payload must be a dictionary or a string, got {type(payload).__name__}")

src/folioclient/_httpx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def tenant_id(self) -> str:
6969
@tenant_id.setter
7070
def tenant_id(self, value: str):
7171
if value != self._tenant_id:
72-
logger.debug("Setting tenant_id to %s", value)
72+
logger.debug("Switching tenant_id from %s to %s", self._tenant_id, value)
7373
self._tenant_id = value
7474

7575
def reset_tenant_id(self):

0 commit comments

Comments
 (0)