Skip to content

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

@rhamzeh

Description

@rhamzeh

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions