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
Add custom error struct for Group/Version not found #116237
Conversation
/sig api-machinery |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one nit, thanks
/approve
/lgtm
// Encapsulates GroupVersion not found as one of the paths | ||
// at OpenAPI V3 endpoint. | ||
type GroupVersionNotFoundError struct { | ||
gv schema.GroupVersion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be public?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If others outside the package want to check the type, they would have to cast to GroupVersionNotFoundError
; so I think it has to be public. Unless we create and export a IsGroupVersionNotFoundError
function in this package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't referring to the type, but to the gv variable
LGTM label has been added. Git tree hash: 7bfc6359d74e14e9b064dec7eaaed3a547025379
|
/cc @yliaog |
thanks for the pr /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: apelisse, seans3, yliaog The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
/triage accepted |
GroupVersionNotFoundError
for OpenAPI V3Root
, instead of current unstructured error string. Allows users ofRoot
to more accurately and reliably check this error condition.96.2%
/kind cleanup