Skip to content

Commit

Permalink
Log broken entries when reading the recordings.log file (#573)
Browse files Browse the repository at this point in the history
  • Loading branch information
hbenl authored Jun 28, 2024
1 parent 33656ea commit 9494138
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .changeset/late-snails-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@replayio/replay": patch
"@replayio/cypress": patch
"@replayio/jest": patch
"@replayio/playwright": patch
"@replayio/puppeteer": patch
"@replayio/test-utils": patch
---

Log broken entries when reading the recordings.log file
3 changes: 3 additions & 0 deletions packages/replay/src/recordingLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ export function readRecordings(dir?: string, includeHidden = false) {
try {
return JSON.parse(line) as RecordingLogEntry;
} catch {
if (line) {
debug('Failed to parse recordings.log entry: "%s"', line);
}
return null;
}
})
Expand Down

0 comments on commit 9494138

Please sign in to comment.