Skip to content

fix: wrap getCurrentChatDir in try-catch to prevent startup crash#788

Open
SOUMITRO-SAHA wants to merge 1 commit into
CodebuffAI:mainfrom
SOUMITRO-SAHA:fix/logger-crash-early-startup
Open

fix: wrap getCurrentChatDir in try-catch to prevent startup crash#788
SOUMITRO-SAHA wants to merge 1 commit into
CodebuffAI:mainfrom
SOUMITRO-SAHA:fix/logger-crash-early-startup

Conversation

@SOUMITRO-SAHA

Copy link
Copy Markdown

Issue #783

The logger calls getCurrentChatDir() during early startup (triggered by
fingerprint initialization), which tries to mkdir the chat directory.
If the config directory hierarchy doesn't exist yet, this throws ENOENT
and crashes the app since the call is in a fire-and-forget promise.

Wrapping the call in try-catch (matching the existing pattern for
getProjectRoot()) lets the logger gracefully skip file logging instead.
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.

1 participant