Skip to content

Commit 1769312

Browse files
cfmCopilot
andauthored
fixup: item_deleted
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent b3206b4 commit 1769312

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

securedrop/journalist_app/api2/events.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,11 @@ def handle_item_deleted(event: Event, minor: int) -> EventResult:
142142
except ValueError as exc:
143143
if str(exc).startswith("Path does not exist"):
144144
return EventResult(event_id=event.id, status=(EventStatusCode.Gone, None))
145-
else:
146-
raise
145+
146+
return EventResult(
147+
event_id=event.id,
148+
status=(EventStatusCode.InternalServerError, str(exc)),
149+
)
147150

148151
@staticmethod
149152
def handle_reply_sent(event: Event, minor: int) -> EventResult:

0 commit comments

Comments
 (0)