-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershacktoberfest
Description
Checklist
- I have looked into the README and have not found a suitable solution or answer.
- I have looked into the documentation and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have upgraded to the latest version of OpenFGA and the issue still persists.
- I have searched the Slack community and have not found a suitable solution or answer.
- I agree to the terms within the OpenFGA Code of Conduct.
Description
In the non-txn Write, we should not error if a single tuple had a validation error
Expectation
We should match what the other SDKs are doing, e.g.
- JS: https://github.com/openfga/js-sdk/blob/main/client.ts#L480-L491
- .NET: https://github.com/openfga/dotnet-sdk/blob/main/src/OpenFga.Sdk/Client/Client.cs#L232-L280
Catching the response if failed and setting status: ClientWriteStatus.FAILURE
for the individual failed tuples
Reproduction
Have the following tuple already written
- user: user:81684243-9356-4421-8fbf-a4f8d36aa31b
relation: viewer
object: document:roadmap
and then do:
var request = new ClientWriteRequest()
.writes(List.of(
new ClientTupleKey()
.user("user:81684243-9356-4421-8fbf-a4f8d36aa31b")
.relation("viewer")
._object("document:roadmap"),
new ClientTupleKey()
.user("user:81684243-9356-4421-8fbf-a4f8d36aa31b")
.relation("viewer")
._object("document:budget")
));
var options = new ClientWriteOptions()
.disableTransactions(true)
.transactionChunkSize(1); // Maximum number of requests to be sent in a transaction in a particular chunk
var response = fgaClient.write(request, options).get();
OpenFGA SDK version
v0.5.0
OpenFGA version
N/A
SDK Configuration
N/A
Logs
No response
References
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershacktoberfest
Type
Projects
Status
Ready