fix: don't retry or show AbortError; remove reason from dispose; don't clean history in dispose

This commit is contained in:
Simon
2026-01-22 20:19:51 +08:00
parent 299a5b2075
commit dad837e173
2 changed files with 8 additions and 7 deletions

View File

@@ -88,12 +88,12 @@ async function withRetry<T>(
try {
return await fn()
} catch (error: unknown) {
// do not retry if aborted by user
if ((error as any)?.rawError?.name === 'AbortError') throw error
console.error(error)
settings.onError(error as Error)
// do not retry if aborted by user
if ((error as { name?: string })?.name === 'AbortError') throw error
// do not retry if error is not retryable (InvokeError)
if (error instanceof InvokeError && !error.retryable) throw error