Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
de208d6c
authored
Jul 21, 2025
by
Finley Ge
Committed by
GitHub
Jul 21, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: error (#5269)
parent
59e2b2f0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
packages/global/common/error/code/common.ts
+1
-1
packages/global/common/error/utils.ts
+7
-0
packages/service/common/response/index.ts
+2
-1
No files found.
packages/global/common/error/code/common.ts
View file @
de208d6c
...
...
@@ -13,7 +13,7 @@ export enum CommonErrEnum {
}
const
datasetErr
=
[
{
statusText
:
CommonErrEnum
.
fileNotFound
,
statusText
:
CommonErrEnum
.
invalidParams
,
message
:
i18nT
(
'common:error.invalid_params'
)
},
{
...
...
packages/global/common/error/utils.ts
View file @
de208d6c
...
...
@@ -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'
;
}
}
packages/service/common/response/index.ts
View file @
de208d6c
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment