Skip to content

identity: Listener exception is swallowed without the exception payload #65

Description

@brandwe

File: src/entrabot/identity/state_machine.py
Location: L156-L166 (listener exception handler)
Category: error-handling
Priority: low

Description

logger.warning logs from_state/to_state but not the exception. Auth-state listeners are exactly the place where a swallowed exception (token-cache write failure, audit-log offline, observability sink rejection) is the data needed for forensic triage of an identity incident.

Suggested fix

logger.warning("Listener error during %s → %s: %s", from_state.value, to_state.value, exc, exc_info=True).


Filed automatically by a thorough code-review pass over src/entrabot/ on 2026-06-13. Internal review id: #68.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions