message_fetch: Don't include full messages data in sentry logs.

Sentry has a limit for how much data it can store as extra info,
we cannot pass full message object here.
This commit is contained in:
Aman Agrawal 2024-11-22 22:22:28 +05:30 committed by Tim Abbott
parent 6d66312707
commit 933870f2fd
1 changed files with 7 additions and 3 deletions

View File

@ -745,14 +745,18 @@ export function verify_cached_data(data: MessageListData): void {
"Mismatching cached and server data.",
{
fetch_request_params,
server_data: data,
server_data: {
...data,
messages: "Removed for sentry logs",
msg_ids: JSON.stringify(data.messages.map((msg) => msg.id)),
},
cached_data: {
has_found_newest,
has_found_oldest,
history_limited,
messages,
msg_ids: JSON.stringify(messages.map((msg) => msg.id)),
},
events_since_restoring_cached_data,
events: JSON.stringify(events_since_restoring_cached_data),
},
error,
);