Skip to content

Commit

Permalink
refactor: discrete algebra
Browse files Browse the repository at this point in the history
Co-authored-by: Kar Rui Lau <[email protected]>
  • Loading branch information
zxt-tzx and karrui authored Sep 21, 2023
1 parent 3d3e89a commit e2e4479
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/utils/trpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ const isErrorRetryableOnClient = (error: unknown): boolean => {
if (typeof window === 'undefined') return true
if (!(error instanceof TRPCClientError)) return true
const res = TRPCWithErrorCodeSchema.safeParse(error)
if (res.success && NON_RETRYABLE_ERROR_CODES.has(res.data)) return false
return true
return !res.success || !NON_RETRYABLE_ERROR_CODES.has(res.data)
}

/**
Expand Down

0 comments on commit e2e4479

Please sign in to comment.