mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-18 01:16:01 +00:00
fix: mcp not response output (#5388)
This commit is contained in:
@@ -4,6 +4,7 @@ import { proxyError, ERROR_RESPONSE, ERROR_ENUM } from '@fastgpt/global/common/e
|
||||
import { addLog } from '../system/log';
|
||||
import { clearCookie } from '../../support/permission/controller';
|
||||
import { replaceSensitiveText } from '@fastgpt/global/common/string/tools';
|
||||
import { UserError } from '@fastgpt/global/common/error/utils';
|
||||
|
||||
export interface ResponseType<T = any> {
|
||||
code: number;
|
||||
@@ -59,7 +60,11 @@ export const jsonRes = <T = any>(
|
||||
msg = error?.error?.message;
|
||||
}
|
||||
|
||||
addLog.error(`Api response error: ${url}, ${msg}`, error);
|
||||
if (error instanceof UserError) {
|
||||
addLog.info(`Request error: ${url}, ${msg}`);
|
||||
} else {
|
||||
addLog.error(`System unexpected error: ${url}, ${msg}`, error);
|
||||
}
|
||||
}
|
||||
|
||||
res.status(code).json({
|
||||
|
Reference in New Issue
Block a user