return notfound errors w/o wrappering them#9763
return notfound errors w/o wrappering them#9763openshift-bot merged 1 commit intoopenshift:masterfrom
Conversation
|
[test] |
|
@smarterclayton ptal |
pkg/build/generator/generator.go
Outdated
|
|
||
| newBuild, err := g.generateBuildFromConfig(ctx, bc, request.Revision, request.Binary) | ||
| if err != nil { | ||
| if errors.IsNotFound(err) { |
There was a problem hiding this comment.
All of the other API types should be ignored. generateBuildFromConfig is responsible for generating the correct API error type - if you want to transform it, transform it in generateBuildFromConfig. We should not be wrapping any error that comes out of gbfc unless it's not an API error.
1cdaad3 to
abc4b32
Compare
pkg/build/generator/generator.go
Outdated
|
|
||
| newBuild, err := g.generateBuildFromConfig(ctx, bc, request.Revision, request.Binary) | ||
| if err != nil { | ||
| if oerrors.IsKnownAPIErrorType(err) { |
There was a problem hiding this comment.
The correct test is casting to APIStatus in the kube pkg/api/errors package - if the error implements that, we consider it already handled.
abc4b32 to
87a21e0
Compare
|
@smarterclayton updated. |
|
Evaluated for origin test up to 87a21e0 |
|
LGTM [merge] |
|
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/6079/) (Image: devenv-rhel7_4569) |
|
Evaluated for origin merge up to 87a21e0 |
|
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/6079/) |
No description provided.