Added FOSSA badge#99
Merged
Merged
Conversation
rhamzeh
approved these changes
Mar 1, 2023
This was referenced Mar 3, 2023
Closed
curfew-marathon
added a commit
that referenced
this pull request
Jul 31, 2025
…nsaction writes Addresses GitHub issue #99 by implementing proper error handling for non-transaction writes to match JavaScript and .NET SDK behavior. ### Key Changes: **New Model Classes:** - Add ClientWriteStatus enum with SUCCESS/FAILURE values - Add ClientWriteSingleResponse class for individual tuple write results - Extend ClientWriteResponse with new constructor supporting detailed results **Core Logic Updates:** - Completely rewrite writeNonTransaction method with parallel processing - Implement individual error isolation per chunk using CompletableFuture.allOf() - Add authentication error re-throwing to maintain existing behavior - Process writes and deletes in parallel chunks for improved performance **Error Handling Improvements:** - Individual tuple failures no longer stop entire operation - Each tuple gets SUCCESS/FAILURE status with optional error details - Authentication errors (FgaApiAuthenticationError) are properly re-thrown - Non-authentication errors are captured per tuple without stopping others **Test Coverage:** - Add comprehensive unit tests for new model classes - Update OpenFgaClientTest with mixed success/failure scenarios - Test authentication error handling and individual tuple status tracking **Configuration Updates:** - Register new template files in config.overrides.json - Maintain backward compatibility with existing API signatures ### Technical Details: The implementation uses CompletableFuture.allOf() for parallel chunk processing, with .exceptionally() handlers that distinguish between authentication errors (which should halt execution) and other errors (which should be captured per tuple). Empty chunk handling is properly implemented to avoid null pointer exceptions, and the chunksOf utility method handles edge cases correctly. ### Backward Compatibility: All existing API signatures are preserved. The new detailed response format is available through the new ClientWriteResponse constructor while maintaining the legacy ApiResponse-based constructor for transaction-based writes. Resolves: openfga/java-sdk#99
4 tasks
curfew-marathon
added a commit
that referenced
this pull request
Aug 4, 2025
…l writes - Update writeNonTransaction method to properly isolate chunk failures - Failed chunks now mark tuples as FAILURE while allowing other chunks to continue processing - Authentication errors are re-thrown to stop all processing as expected - Matches .NET SDK behavior where 'some will pass some will fail' for non-transactional operations - Each chunk processes independently with proper error boundary isolation - Resolves issue #99 for Java SDK non-transaction write error handling This ensures that individual chunk failures don't affect the processing of other chunks, allowing for proper partial success scenarios in non-transactional write operations.
SoulPancake
pushed a commit
that referenced
this pull request
Nov 20, 2025
Bumps the dependencies group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [codecov/codecov-action](https://github.com/codecov/codecov-action). Updates `actions/checkout` from 4.1.5 to 4.1.6 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@44c2b7a...a5ac7e5) Updates `codecov/codecov-action` from 4.3.1 to 4.4.0 - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](codecov/codecov-action@5ecb98a...6d79887) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dependencies - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dependencies ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.
No description provided.