-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
.NET SDK throws exception when GetCheckAsync returns allowed: false #851
Comments
Thanks for this. As pointed out previously, the status code in case of a false check response is set to Current workaround: catch the |
I believe that error status codes (400,500,..) will always return an error response in OpenAPI generated clients. You can type those for better assertiveness, but it will still throw an error! |
It is not an error message, it is a legit response: keto/internal/check/handler.go Lines 160 to 165 in ef103eb
|
Sorry, I meant error status codes. So everything >= 400 |
Yes, that is why we should not return an error status code for the SDKs. Not sure what options we have to do that. Do the SDKs set a specific user agent? Or should we add a second route? We could also make it depend on a query parameter. |
I'd suggest to make this as explicit. Interpreting 200 as "ok this passed" even though it didnt due to some obscure User-Agent behavior or other "auto-detect" feature (even query string) would be quite bad. Actually, I think we need to choose for this endpoint whether to walk back and go with the 200 route again. |
OK so having two endpoints makes more sense right? |
Preflight checklist
Describe the bug
When using GetCheckAsync of the .NET Keto SDK, an exception is thrown for requests that are not allowed.
Reproducing the bug
I have created a repository to reproduce this behavior. Github Repository
docker-compose up -d
dotnet run
Relevant log output
No response
Relevant configuration
No response
Version
oryd/keto:v0.8.0
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Docker Compose
Additional Context
No response
The text was updated successfully, but these errors were encountered: