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

fix(python-sdk): list relations should throw error #502

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

GMorris-professional
Copy link
Contributor

@GMorris-professional GMorris-professional commented Feb 28, 2025

ListRelations now throws the first error that occurs during one of the checks instead of swallowing the it.

Description

  • Added a new private method to determine if a check has an error (_check_error)
  • The list_response method now has logic to filter out any errored check responses and throw the first error for both the async and the sync clients

References

Part of #183

closes openfga/python-sdk#173

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

@GMorris-professional GMorris-professional requested a review from a team as a code owner February 28, 2025 10:36
Copy link

linux-foundation-easycla bot commented Feb 28, 2025

CLA Not Signed

@GMorris-professional
Copy link
Contributor Author

GMorris-professional commented Feb 28, 2025

Hi @rhamzeh,

I see I had put my organisation to my profile but didn't realise it would affect the CLA. This work is purely done under my personal capacity and is not affiliated with my organisation. Do I still need to sign a Corporate CLA?

Thanks 🙌

@rhamzeh
Copy link
Member

rhamzeh commented Mar 3, 2025

Thanks @GMorris-professional!

When signing the CLA, it does ask if you want to sign as Individual Contributor or as a Corporate - and so far as the email in the commit is in your GitHub profile, it should allow you to proceed.

Screenshot 2025-03-03 at 11 52 12 AM

@aaguiarz may have more details on that.

Beyond that, I am not sure - we can to reach out to the folks in CNCF/Linux Foundation and see if they have any guidance if you have any specific questions you'd like clarified. Or to see if they grant exceptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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