From 7b43ca028ba233725bc1734b0e00e22bd670fcce Mon Sep 17 00:00:00 2001 From: Cyberes Date: Sat, 18 Mar 2023 14:06:40 -0600 Subject: [PATCH] print errors --- matrix_gpt/bot/chat_functions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/matrix_gpt/bot/chat_functions.py b/matrix_gpt/bot/chat_functions.py index ef6d7b4..7720538 100644 --- a/matrix_gpt/bot/chat_functions.py +++ b/matrix_gpt/bot/chat_functions.py @@ -210,7 +210,10 @@ async def process_chat(client, room, event, command, store, openai, thread_root_ resp = await send_text_to_room(client, room.room_id, text_response, reply_to_event_id=event.event_id, thread=True, thread_root_id=thread_root_id if thread_root_id else event.event_id) await client.room_typing(room.room_id, typing_state=False, timeout=3000) store.add_event_id(event.event_id) - store.add_event_id(resp.event_id) + if not isinstance(resp, RoomSendResponse): + logger.critical(f'Failed to respond to event {event.event_id} in room {room.room_id}:\n{vars(resp)}') + else: + store.add_event_id(resp.event_id) # else: # logger.info(f'Not responding to seen event {event.event_id}')