- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for IsBadRequest (0.17 sec)
-
staging/src/k8s.io/apiextensions-apiserver/test/integration/limit_test.go
AbsPath("/apis", noxuDefinition.Spec.Group, noxuDefinition.Spec.Versions[0].Name, noxuDefinition.Spec.Names.Plural). Body(yamlBody). DoRaw(context.TODO()) if !apierrors.IsBadRequest(err) { t.Errorf("expected bad request, got %v", err) } }) // Create YAML just under 3MB limit, not nested t.Run("create YAML doc under limit, not nested", func(t *testing.T) { if testing.Short() {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Mar 02 19:34:41 UTC 2021 - 8K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/api/errors/errors_test.go
} if IsNotFound(err) { t.Errorf("expected to not be %s", metav1.StatusReasonNotFound) } if IsInvalid(err) { t.Errorf("expected to not be %s", metav1.StatusReasonInvalid) } if IsBadRequest(err) { t.Errorf("expected to not be %s", metav1.StatusReasonBadRequest) } if IsForbidden(err) { t.Errorf("expected to not be %s", metav1.StatusReasonForbidden) } if IsServerTimeout(err) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Oct 28 07:31:28 UTC 2023 - 19.5K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/test/integration/fieldselector_test.go
w, err := shirtClient.Watch(ctx, metav1.ListOptions{FieldSelector: tc.fieldSelector}) if err == nil { w.Stop() t.Fatal("Expected error but got none") } if !apierrors.IsBadRequest(err) { t.Errorf("Expected BadRequest but got %v", err) } }) } }) for _, instance := range []string{shirtInstance1, shirtInstance2, shirtInstance3} {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 06 15:53:03 UTC 2024 - 27K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/resource/helper.go
// making sure to retain the StatusError type when applicable. func EnhanceListError(err error, opts metav1.ListOptions, subj string) error { if apierrors.IsResourceExpired(err) { return err } if apierrors.IsBadRequest(err) || apierrors.IsNotFound(err) { if se, ok := err.(*apierrors.StatusError); ok { // modify the message without hiding this is an API error if len(opts.LabelSelector) == 0 && len(opts.FieldSelector) == 0 {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Mar 26 03:45:13 UTC 2022 - 10.5K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/api/errors/errors.go
} if _, ok := knownReasons[reason]; !ok && code == http.StatusServiceUnavailable { return true } return false } // IsBadRequest determines if err is an error which indicates that the request is invalid. // It supports wrapped errors and returns false when the error is nil. func IsBadRequest(err error) bool { reason, code := reasonAndCodeForError(err) if reason == metav1.StatusReasonBadRequest { return true }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat May 21 03:41:32 UTC 2022 - 30.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest_test.go
actual := &testPatchType{} err := strategicPatchObject(context.TODO(), defaulter, original, []byte(patch), actual, &testPatchType{}, "") if !apierrors.IsBadRequest(err) { t.Errorf("expected HTTP status: BadRequest, got: %#v", apierrors.ReasonForError(err)) } if !strings.Contains(err.Error(), expectedError) { t.Errorf("expected %#v, got %#v", expectedError, err.Error()) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 28 08:48:22 UTC 2024 - 41.8K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/test/integration/objectmeta_test.go
t.Fatalf("unexpected non-error, expected invalid labels to be rejected: %v", err) } if status, ok := err.(errors.APIStatus); !ok { t.Fatalf("expected APIStatus error, but got: %#v", err) } else if !errors.IsBadRequest(err) { t.Fatalf("expected BadRequst error, but got: %v", errors.ReasonForError(err)) } else if !strings.Contains(status.Status().Message, "cannot be handled") {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 06 05:32:34 UTC 2023 - 19K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/test/integration/basic_test.go
// Case when typeless Unstructured object is passed typelessInstance := &unstructured.Unstructured{} if _, err := noxuResourceClient.Create(context.TODO(), typelessInstance, metav1.CreateOptions{}); !errors.IsBadRequest(err) { t.Errorf("expected badrequest for submitting empty object, got %#v", err) } // Case when apiVersion and Kind would be set up from GVK, but no other objects are present
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Apr 23 11:35:33 UTC 2024 - 33.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/registry/rest/resttest/resttest.go
if got != nil || created { t.Errorf("expected nil object and no creation for object: %v", toUpdate) } if !errors.IsInvalid(err) && !errors.IsBadRequest(err) { t.Errorf("expected invalid or bad request error, got %v", err) } } } func (t *Tester) testUpdateWithWrongUID(obj runtime.Object, createFn CreateFunc, getFn GetFunc, opts metav1.UpdateOptions) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 26 17:14:05 UTC 2022 - 55.8K bytes - Viewed (0)