Files
dify/web/service/client-error.ts
T
fd2db63184 feat: KnowledgeFS and New Knowledge (#44165)
Co-authored-by: Jyong <76649700+JohnJyong@users.noreply.github.com>
Co-authored-by: hjlarry <hjlarry@163.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: zhaohao1004 <zhaohao1004@gmail.com>
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
Co-authored-by: FFXN <lizy@dify.ai>
2026-10-23 03:34:59 +00:00

10 lines
332 B
TypeScript

function isAbortError(error: unknown): boolean {
if (!error || typeof error !== 'object') return false
if ('name' in error && error.name === 'AbortError') return true
return 'cause' in error && isAbortError(error.cause)
}
export function reportClientError(error: unknown) {
if (!isAbortError(error)) console.error(error)
}