fix(llm): fix logging type check

This commit is contained in:
perf3ct 2025-06-09 00:23:02 +00:00
parent 41906abaf9
commit e96fdbf72f
No known key found for this signature in database
GPG Key ID: 569C4EEC436F5232

View File

@ -429,7 +429,7 @@ export async function processProviderStream(
};
} catch (error) {
// Improved error handling to preserve original error even if logging fails
let logError = null;
let logError: unknown | null = null;
try {
log.error(`Error in ${options.providerName} stream processing: ${error instanceof Error ? error.message : String(error)}`);
log.error(`Error details: ${error instanceof Error ? error.stack : 'No stack trace available'}`);