From 75c6d6c3f3b78dfbce2d58dbc493133ad5a29be0 Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 20 Aug 2024 16:40:10 -0400 Subject: [PATCH] Add log for server crash --- src/libs/actions/Report.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts index 2611dae20d7ec..7eb7e01d6edd6 100644 --- a/src/libs/actions/Report.ts +++ b/src/libs/actions/Report.ts @@ -1238,6 +1238,11 @@ function readNewestAction(reportID: string, shouldResetUnreadMarker = false) { * Sets the last read time on a report */ function markCommentAsUnread(reportID: string, reportActionCreated: string) { + if (reportID === '-1') { + Log.warn('7339cd6c-3263-4f89-98e5-730f0be15784 Invalid report passed to MarkCommentAsUnread. Not calling the API because it wil fail.'); + return; + } + const reportActions = allReportActions?.[reportID]; // Find the latest report actions from other users