Fix failed batch operations printing result and passing silently - #361
Merged
Conversation
- '_validate_operations_result' printed the whole result to stdout. It is logged as warning instead. - When the batch failed but no single operation was reported as failed, the method returned without raising, so the failure was ignored. - Missing 'operations' key or an unknown operation id raised KeyError or StopIteration instead of FailedOperations. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
iLLiCiTiT
approved these changes
Sep 14, 2026
iLLiCiTiT
reviewed
Sep 14, 2026
iLLiCiTiT
approved these changes
Sep 14, 2026
iLLiCiTiT
approved these changes
Sep 14, 2026
BigRoy
marked this pull request as ready for review
September 14, 2026 15:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
When a batch of operations fails (
send_batch_operations,send_background_batch_operations(wait=True),OperationsSession.commit()):printed to stdout — noise in host application consoles and pipelines, not controllable by logging.success: falsebut no individual operation as failed, the method returns without raising, so the failure is silently ignored.operationskey or an operation id not found in the sent operations raiseKeyError/StopIterationinstead ofFailedOperations.Fix
printwith a warning log.FailedOperationswith the server response when no failed operation can be identified..get("operations")and fall back to the operation result when the sent operation is not found.Reproduce
Updating a non-existing folder (does not change any data):
Testing notes
logging.getLogger(con.log.name).setLevel(logging.ERROR)).tests/test_operations_result.pycovers the silent failure case.🤖 Generated with Claude Code