mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 13:03:50 +00:00

* rebase * i18n-1 * add error info i18n * fix * fix * refactor: 删除error.json * delete useI18n
26 lines
629 B
TypeScript
26 lines
629 B
TypeScript
import { ErrType } from '../errorCode';
|
|
import { i18nT } from '../../../../web/i18n/utils';
|
|
/* dataset: 509000 */
|
|
export enum SystemErrEnum {
|
|
communityVersionNumLimit = 'communityVersionNumLimit'
|
|
}
|
|
|
|
const systemErr = [
|
|
{
|
|
statusText: SystemErrEnum.communityVersionNumLimit,
|
|
message: i18nT('common:code_error.system_error.community_version_num_limit')
|
|
}
|
|
];
|
|
|
|
export default systemErr.reduce((acc, cur, index) => {
|
|
return {
|
|
...acc,
|
|
[cur.statusText]: {
|
|
code: 509000 + index,
|
|
statusText: cur.statusText,
|
|
message: cur.message,
|
|
data: null
|
|
}
|
|
};
|
|
}, {} as ErrType<`${SystemErrEnum}`>);
|