Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python SDK: ListRelations should not swallow errors if an underlying check errors out #183 #173

Open
rhamzeh opened this issue Feb 19, 2025 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@rhamzeh
Copy link
Member

rhamzeh commented Feb 19, 2025

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 openfga/js-sdk#32

Relevant files to be changed: https://github.com/openfga/python-sdk/blob/main/openfga_sdk/client/client.py#L973

On first error encountered, return that.

@rhamzeh rhamzeh changed the title Python SDK Python SDK: ListRelations should not swallow errors if an underlying check errors out #183 Feb 19, 2025
@rhamzeh rhamzeh transferred this issue from openfga/sdk-generator Feb 19, 2025
@rhamzeh rhamzeh moved this from Backlog to Ready in SDKs and Tooling Feb 19, 2025
@rhamzeh rhamzeh added bug Something isn't working good first issue Good for newcomers labels Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
Status: Ready
Development

No branches or pull requests

1 participant