mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
fix(server): catch panic for context parsing (#10912)
fix AF-2335 fix CLOUD-173
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
Config,
|
||||
EventBus,
|
||||
JobQueue,
|
||||
mapAnyError,
|
||||
OnEvent,
|
||||
OnJob,
|
||||
} from '../../../base';
|
||||
@@ -160,10 +161,11 @@ export class CopilotContextDocJob implements OnModuleInit {
|
||||
chunkSize: total,
|
||||
});
|
||||
} catch (e: any) {
|
||||
this.logger.error(
|
||||
`Failed to embed pending file: ${contextId}::${fileId}`,
|
||||
e
|
||||
);
|
||||
const error = mapAnyError(e);
|
||||
error.log('CopilotJob', {
|
||||
workspaceId,
|
||||
fileId,
|
||||
});
|
||||
|
||||
this.event.emit('workspace.file.embed.failed', {
|
||||
contextId,
|
||||
|
||||
Reference in New Issue
Block a user