dotnet-sdk
dotnet-sdk copied to clipboard
.NET SDK: ListRelations should not swallow errors if an underlying check errors out #183
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.