Skip to content

SDK-365 Fix infinite retry loop in ResolverCommand when error is not a file conflict#350

Merged
saimonation merged 1 commit intomasterfrom
SDK-365-fix-resolver-infinite-retry
May 6, 2026
Merged

SDK-365 Fix infinite retry loop in ResolverCommand when error is not a file conflict#350
saimonation merged 1 commit intomasterfrom
SDK-365-fix-resolver-infinite-retry

Conversation

@udirctera
Copy link
Copy Markdown
Collaborator

Summary

  • Fix infinite retry loop in ResolverCommand.execute() and a_execute() when the error is not a file conflict
  • Previously, any CopyError/MoveError/RenameError with a resolver present would trigger a retry, causing an infinite loop for PermissionDenied and other non-conflict errors
  • Now only retries when e.__cause__ is FileConflictError

Root Cause

When a ReadOnlyAdmin copies/moves between users cloud folders with a conflict resolver:

  1. Portal correctly rejects with PermissionDeniedException
  2. SDK raises CopyError (without FileConflictError cause)
  3. a_execute() catches CopyError, sees resolver is set, retries
  4. Infinite loop (~1 request/second until MCP stream timeout at 5 minutes)

Test plan

  • Verified on Portal VM: RO Admin copy with conflict_resolution=rename now returns error in ~1 second (was hanging indefinitely)
  • Normal copy with conflict resolver still works correctly
  • Normal copy/move without resolver unaffected

Fixes: https://cteranet.atlassian.net/browse/SDK-365
Related: https://cteranet.atlassian.net/browse/PIM-7443

…a file conflict

ResolverCommand.execute() and a_execute() previously retried with the
resolver for ANY CopyError/MoveError/RenameError. This caused an infinite
loop when the portal returned PermissionDenied (or any non-conflict error)
because the retry would immediately fail again with the same error.

Now only retries when e.__cause__ is FileConflictError, which is the only
case where a resolver can meaningfully resolve the issue.

Co-authored-by: Cursor <cursoragent@cursor.com>
@saimonation saimonation merged commit 4acb84c into master May 6, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants