Skip to content

Commit

Permalink
Fix missing error event context handling for aiogd_update
Browse files Browse the repository at this point in the history
  • Loading branch information
ightingale committed Feb 16, 2025
1 parent d99d15f commit 43dca25
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/aiogram_dialog/context/intent_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
DialogUpdateEvent,
EventContext,
Stack,
DialogUpdate,
)
from aiogram_dialog.api.exceptions import (
InvalidStackIdError,
Expand Down Expand Up @@ -129,6 +130,8 @@ def event_context_from_error(event: ErrorEvent) -> EventContext:
return event_context_from_chat_join(event.update.chat_join_request)
elif event.update.callback_query:
return event_context_from_callback(event.update.callback_query)
elif isinstance(event.update, DialogUpdate) and event.update.aiogd_update:
return event_context_from_aiogd(event.update.aiogd_update)
raise ValueError("Unsupported event type in ErrorEvent.update")


Expand Down

0 comments on commit 43dca25

Please sign in to comment.