refactor: replace happy_path_error__with_fallback with logger.happyPathError (#313)
- Removed all instances of happy_path_error__with_fallback from various hooks, services, and utilities. - Introduced logger.happyPathError for consistent logging of unexpected nulls and fallback values. - Updated the logger utility to include a new happyPathError method with enhanced context and stack trace. - Deprecated silent-debug utility as all logging functionality has been migrated to the logger.
This commit is contained in:
@@ -15,7 +15,6 @@ import { SessionStore } from '../sqlite/SessionStore.js';
|
||||
import { logger } from '../../utils/logger.js';
|
||||
import { SettingsDefaultsManager } from '../../shared/SettingsDefaultsManager.js';
|
||||
import { USER_SETTINGS_PATH } from '../../shared/paths.js';
|
||||
import { happy_path_error__with_fallback } from '../../utils/silent-debug.js';
|
||||
import path from 'path';
|
||||
import os from 'os';
|
||||
|
||||
@@ -780,9 +779,11 @@ export class ChromaSync {
|
||||
arguments: arguments_obj
|
||||
});
|
||||
|
||||
const resultText = happy_path_error__with_fallback(
|
||||
const resultText = logger.happyPathError(
|
||||
'CHROMA',
|
||||
'Missing text in MCP chroma_query_documents result',
|
||||
{ project: this.project, query_text: query },
|
||||
{ project: this.project },
|
||||
{ query_text: query },
|
||||
result.content[0]?.text || ''
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user