Skip to content

Commit ff10f73

Browse files
committed
FIX: Fix exception callback with missing name
1 parent 1dfc9d1 commit ff10f73

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#### Bug fixes
66
- Fixed an issue where starting a `Live` client before subscribing gave an incorrect error message
7+
- Fixed an issue where a `Live` client exception callback would fail when the callback function does not have a `__name__` attribute
78

89
## 0.16.0 - 2023-07-25
910

databento/live/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ async def _callback_task(
197197
logger.error(
198198
"error dispatching %s to `%s` callback",
199199
type(record).__name__,
200-
record_callback.__name__,
200+
getattr(record_callback, "__name__", str(record_callback)),
201201
exc_info=exc,
202202
)
203203
if exception_callback is not None:

0 commit comments

Comments
 (0)