perf: fetch error

This commit is contained in:
archer
2023-06-24 21:21:53 +08:00
parent 83d755ad0e
commit 057c3411b9
4 changed files with 95 additions and 80 deletions

View File

@@ -116,7 +116,7 @@ export const voiceBroadcast = ({ text }: { text: string }) => {
};
export const getErrText = (err: any, def = '') => {
const msg = typeof err === 'string' ? err : err?.message || def || '';
const msg: string = typeof err === 'string' ? err : err?.message || def || '';
msg && console.log('error =>', msg);
return msg;
};