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

Forward Correct Status Code in KFAM API #28

Open
Collinbrown95 opened this issue Nov 7, 2022 · 4 comments
Open

Forward Correct Status Code in KFAM API #28

Collinbrown95 opened this issue Nov 7, 2022 · 4 comments

Comments

@Collinbrown95
Copy link

Collinbrown95 commented Nov 7, 2022

/kind feature

CC: @Souheil-Yazji @mathis-marcotte

Why you need this feature:
The current implementation off the KFAM API has several endpoints where any error is assumed to be 403 Forbidden. E.g. ReadBinding.

Describe the solution you'd like:
Perhaps we could forward along the http response directly by using something like err.ErrStatus.Code instead of hard-coding http.StatusForbidden.

Anything else you would like to add:
Ideally, it would be helpful to add some additional debug logs to some of these messages to facilitate debugging. My team has a use case where we are getting occasional errors that are incorrectly reported as 403 Forbidden with very little additional information to help debug. It would be helpful if we could set the log level to debug instead of the default log level and get more detail about the error message.

@Souheil-Yazji
Copy link

Bumping this for visibility. Debugging the Kubeflow Access Management component would be much easier if the appropriate error codes were used depending on err values instead of returning a blanket 403 when that is indeed incorrect.

@andreyvelich
Copy link
Member

/transfer dashboard

@google-oss-prow google-oss-prow bot transferred this issue from kubeflow/kubeflow Nov 11, 2024
Copy link

@Collinbrown95: The label(s) kind/feature cannot be applied, because the repository doesn't have them.

In response to this:

/kind feature

CC: @Souheil-Yazji @mathis-marcotte

Why you need this feature:
The current implementation off the KFAM API has several endpoints where any error is assumed to be 403 Forbidden. E.g. ReadBinding.

Describe the solution you'd like:
Perhaps we could forward along the http response directly by using something like err.ErrStatus.Code instead of hard-coding http.StatusForbidden.

Anything else you would like to add:
Ideally, it would be helpful to add some additional debug logs to some of these messages to facilitate debugging. My team has a use case where we are getting occasional errors that are incorrectly reported as 403 Forbidden with very little additional information to help debug. It would be helpful if we could set the log level to debug instead of the default log level and get more detail about the error message.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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

No branches or pull requests

3 participants