mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-27 13:29:15 +07:00
🐛 fix(userMemories): should log out more errors for extraction (#11810)
This commit is contained in:
@@ -579,6 +579,7 @@ export class MemoryExtractionExecutor {
|
||||
message: error instanceof Error ? error.message : 'Failed to generate embeddings',
|
||||
});
|
||||
span.recordException(error as Error);
|
||||
console.error('[memory-extraction] failed to generate embeddings', error, 'model:', model);
|
||||
|
||||
return texts.map(() => null);
|
||||
} finally {
|
||||
@@ -1376,6 +1377,14 @@ export class MemoryExtractionExecutor {
|
||||
message: error instanceof Error ? error.message : 'Extraction failed',
|
||||
});
|
||||
span.recordException(error as Error);
|
||||
console.error(
|
||||
'[memory-extraction] topic extraction failed',
|
||||
error,
|
||||
'topicId:',
|
||||
job.topicId,
|
||||
'userId:',
|
||||
job.userId,
|
||||
);
|
||||
|
||||
if (tracePayload) {
|
||||
tracePayload.error = serializeError(error);
|
||||
@@ -1692,6 +1701,18 @@ export class MemoryExtractionExecutor {
|
||||
error instanceof Error ? error.message : 'Failed to persist extracted memories',
|
||||
});
|
||||
span.recordException(error as Error);
|
||||
console.error(
|
||||
'[memory-extraction] failed to persist memories',
|
||||
error,
|
||||
'layer:',
|
||||
layer,
|
||||
'source:',
|
||||
job.source,
|
||||
'sourceId:',
|
||||
job.sourceId,
|
||||
'userId:',
|
||||
job.userId,
|
||||
);
|
||||
} finally {
|
||||
span.end();
|
||||
}
|
||||
@@ -2105,6 +2126,14 @@ export class MemoryExtractionExecutor {
|
||||
message: error instanceof Error ? error.message : 'Extraction failed',
|
||||
});
|
||||
span.recordException(error as Error);
|
||||
console.error(
|
||||
'[memory-extraction] benchmark extraction failed',
|
||||
error,
|
||||
'sourceId:',
|
||||
params.sourceId,
|
||||
'userId:',
|
||||
params.userId,
|
||||
);
|
||||
throw error;
|
||||
} finally {
|
||||
span.end();
|
||||
|
||||
Reference in New Issue
Block a user