Skip to content

Commit

Permalink
Return proper errors on aggregated-api subresources
Browse files Browse the repository at this point in the history
Return a Status object in order to avoid that the apiserver overrides
all our custom errors.

This allows us to finally use all return codes which we need and also
improves the error reporting on the client side.

Signed-off-by: Roman Mohr <[email protected]>
  • Loading branch information
rmohr committed Dec 10, 2019
1 parent cbf1c22 commit acf1828
Show file tree
Hide file tree
Showing 8 changed files with 237 additions and 195 deletions.
2 changes: 1 addition & 1 deletion pkg/virt-api/rest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ go_test(
"//vendor/github.com/onsi/gomega:go_default_library",
"//vendor/github.com/onsi/gomega/ghttp:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/json:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/uuid:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:go_default_library",
"//vendor/k8s.io/client-go/tools/clientcmd:go_default_library",
Expand Down
227 changes: 119 additions & 108 deletions pkg/virt-api/rest/subresource.go

Large diffs are not rendered by default.

Loading

0 comments on commit acf1828

Please sign in to comment.