Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add log for body parsing error
  • Loading branch information
mydea committed Nov 10, 2023
commit 97767d44a5ca2d05f2e72afe280fbfff3a90dac6
6 changes: 4 additions & 2 deletions packages/replay/src/coreHandlers/util/networkUtils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { TextEncoderInternal } from '@sentry/types';
import { dropUndefinedKeys, stringMatchesSomePattern } from '@sentry/utils';
import { dropUndefinedKeys, logger, stringMatchesSomePattern } from '@sentry/utils';

import { NETWORK_BODY_MAX_SIZE, WINDOW } from '../../constants';
import type {
Expand Down Expand Up @@ -74,7 +74,9 @@ export function getBodyString(body: unknown): string | undefined {
if (body instanceof FormData) {
return _serializeFormData(body);
}
} catch {} // eslint-disable-line no-empty
} catch {
__DEBUG_BUILD__ && logger.warn('[Replay] Failed to serialize body', body);
}

return undefined;
}
Expand Down