fix: error (#5269)
Some checks are pending
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions

This commit is contained in:
Finley Ge 2025-07-21 22:19:34 +08:00 committed by GitHub
parent 59e2b2f0bf
commit de208d6c3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 2 deletions

View File

@ -13,7 +13,7 @@ export enum CommonErrEnum {
}
const datasetErr = [
{
statusText: CommonErrEnum.fileNotFound,
statusText: CommonErrEnum.invalidParams,
message: i18nT('common:error.invalid_params')
},
{

View File

@ -15,3 +15,10 @@ export const getErrText = (err: any, def = ''): any => {
// msg && console.log('error =>', msg);
return replaceSensitiveText(msg);
};
export class UserError extends Error {
constructor(message: string) {
super(message);
this.name = 'UserError';
}
}

View File

@ -31,7 +31,8 @@ export const jsonRes = <T = any>(
clearCookie(res);
}
addLog.error(`Api response error: ${url}`, ERROR_RESPONSE[errResponseKey]);
// Bussiness Side Error
addLog.info(`Api response error: ${url}`, ERROR_RESPONSE[errResponseKey]);
res.status(code);