mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-25 06:14:06 +00:00
8 lines
268 B
TypeScript
8 lines
268 B
TypeScript
import { replaceSensitiveLink } from '../string/tools';
|
|
|
|
export const getErrText = (err: any, def = '') => {
|
|
const msg: string = typeof err === 'string' ? err : err?.message || def || '';
|
|
msg && console.log('error =>', msg);
|
|
return replaceSensitiveLink(msg);
|
|
};
|