Skip to content

fix(debug): fix malformed log filename and persist HTTP warnings to IndexedDB (#181)#197

Open
rupeshca007 wants to merge 1 commit intoNetflix:masterfrom
rupeshca007:fix-issue-181
Open

fix(debug): fix malformed log filename and persist HTTP warnings to IndexedDB (#181)#197
rupeshca007 wants to merge 1 commit intoNetflix:masterfrom
rupeshca007:fix-issue-181

Conversation

@rupeshca007
Copy link
Copy Markdown

Fixes #181.

Description

This PR resolves two related defects in the client-side debug logging infrastructure:

Bug 1 - Malformed log filename (debugdb.ts):
The getLogs() function had a stray } at the end of the template literal, producing filenames like logs-2025-01-01T00:00:00.000Z}.txt. Removed the extra }.

Bug 2 - HTTP warnings missing from debug log (errorlogger.ts):
logWarning() only called console.warn, never writing to the IndexedDB debug log via setLogItem. This meant downloaded crash reports were missing the most useful diagnostic entries. Fixed by importing setLogItem from debugdb and calling it inside logWarning to persist all warnings to the persistent log.

Changes

  • src/utils/debugdb.ts - Removed stray } from filename template literal.
    • src/utils/errorlogger.ts - Added setLogItem call to persist warnings to IndexedDB debug log.

Verification

  1. Enabled debug mode and triggered a failing API request.
    1. Downloaded logs - filename is now correctly formatted (logs-.txt).
    1. Opened the log file - confirmed "WARN HTTP error id: ..." entries are present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Debug log download produces malformed filename and omits HTTP warning entries

1 participant