Commit de208d6c by Finley Ge Committed by GitHub

fix: error (#5269)

parent 59e2b2f0
......@@ -13,7 +13,7 @@ export enum CommonErrEnum {
}
const datasetErr = [
{
statusText: CommonErrEnum.fileNotFound,
statusText: CommonErrEnum.invalidParams,
message: i18nT('common:error.invalid_params')
},
{
......
......@@ -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';
}
}
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment