dotnet-sdk icon indicating copy to clipboard operation
dotnet-sdk copied to clipboard

.NET SDK: ListRelations should not swallow errors if an underlying check errors out #183

Open rhamzeh opened this issue 8 months ago • 0 comments

Currently, many of the SDKs treat errors from the underlying checks (after retrying) as a falsy value. So if after 3 retries, check returned 500, ListRelations would treat it as allowed=false.

This is incorrect behaviour and ListRelations should surface any errors to the user.

For reference, the JS SDK was fixed in https://github.com/openfga/js-sdk/pull/32

Relevant files to be changed: https://github.com/openfga/dotnet-sdk/blob/main/src/OpenFga.Sdk/Client/Client.cs#L408-L413

On first error encountered, return that.

rhamzeh avatar Feb 19 '25 17:02 rhamzeh