mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-30 02:12:38 +00:00
perf: mcp save raw schema (#5030)
* perf: mcp save raw schema * fix: test * code * perf: json schema test * perf: mcp
This commit is contained in:
@@ -167,7 +167,15 @@ export async function delFileByFileIdList({
|
||||
const bucket = getGridBucket(bucketName);
|
||||
|
||||
for await (const fileId of fileIdList) {
|
||||
await bucket.delete(new Types.ObjectId(fileId));
|
||||
try {
|
||||
await bucket.delete(new Types.ObjectId(String(fileId)));
|
||||
} catch (error: any) {
|
||||
if (typeof error?.message === 'string' && error.message.includes('File not found')) {
|
||||
addLog.warn('File not found', { fileId });
|
||||
return;
|
||||
}
|
||||
return Promise.reject(error);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user