zulip/zulip-terminal

Event traceback from peer_remove event

Closed

#1,220 opened on May 4, 2022

 (8 comments) (0 reactions) (0 assignees)Python (352 forks)github user discovery
area: event handlingbughelp wanted

Repository metrics

Stars
 (853 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

I've only seen this once, so this is likely an uncommon situation. This caused the popup which occurs when an event handler function doesn't handle all exceptions, from an error on line 1241 of models.py.

We likely want to check that a user removed from our known users in a stream is present before removing them, or else handle the exception instead - basically limit the exception from leaking out and giving the popup which occurs in these situations.

This is very likely a small change, but shouldn't really occur unless we miss a peer_add event for some reason, or else there is some timing issue, though it is possible there is something else going on. For that reason we likely want a comment in the code. It may also be worth exploring if the web app or mobile modifies this data in another situation which we may be missing.

Due to the challenge of debugging this behavior, we definitely want to add/extend tests for this case.

Contributor guide