.NET SDK - ListRelations throws exception when relation is not found #526
Unanswered
antonio-dfg
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello team 👋
We are implementing the ListRelations method (using the .NET SDK) and noticed that when passing a relation that does not exists, ListRelations is returning the following exception (relation not found), is this expected?
OpenFga.Sdk.Exceptions.FgaApiValidationError: relation 'agreement#can_do_something' not foundI would expect the following:
can_do_A,can_do_B) and 1 relation that does not exist (can_do_something) in the authorization model:can_do_A,can_do_B) and return them (if user has relations)can_do_something)Another question is, there is a way to List the relations a user has on an object without passing the relations?
Asking because when using CLI this is possible by doing the following:
fga query list-relations user:anne document:readmeLet me know your thoughts... 💭
Thanks and keep up the good work!
Beta Was this translation helpful? Give feedback.
All reactions