mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-27 08:25:07 +00:00

* perf: plan tip * perf: upload size controller * feat: add image ttl index * feat: new upload file ux * remove file * feat: support read pptx * feat: support xlsx * fix: rerank docker flie
30 lines
636 B
TypeScript
30 lines
636 B
TypeScript
import { ErrType } from '../errorCode';
|
|
|
|
/* dataset: 507000 */
|
|
const startCode = 507000;
|
|
export enum CommonErrEnum {
|
|
fileNotFound = 'fileNotFound',
|
|
unAuthFile = 'unAuthFile'
|
|
}
|
|
const datasetErr = [
|
|
{
|
|
statusText: CommonErrEnum.fileNotFound,
|
|
message: 'error.fileNotFound'
|
|
},
|
|
{
|
|
statusText: CommonErrEnum.unAuthFile,
|
|
message: 'error.unAuthFile'
|
|
}
|
|
];
|
|
export default datasetErr.reduce((acc, cur, index) => {
|
|
return {
|
|
...acc,
|
|
[cur.statusText]: {
|
|
code: startCode + index,
|
|
statusText: cur.statusText,
|
|
message: cur.message,
|
|
data: null
|
|
}
|
|
};
|
|
}, {} as ErrType<`${CommonErrEnum}`>);
|