Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 44 for NewInternalError (0.2 sec)

  1. staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/etcd.go

    			err = storageerr.InterpretUpdateError(err, apiextensions.Resource("customresourcedefinitions"), name)
    			if _, ok := err.(*apierrors.StatusError); !ok {
    				err = apierrors.NewInternalError(err)
    			}
    			return nil, false, err
    		}
    
    		return out, false, nil
    	}
    
    	return r.Store.Delete(ctx, name, deleteValidation, options)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 18 09:21:19 UTC 2022
    - 8K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/util/etcd/etcd_test.go

    			},
    			clientSetup: func(clientset *clientsetfake.Clientset) {
    				clientset.PrependReactor("list", "pods", func(action clienttesting.Action) (handled bool, ret runtime.Object, err error) {
    					return true, nil, apierrors.NewInternalError(errors.New("API server down"))
    				})
    			},
    			expectedErr: true,
    		},
    	}
    	for _, rt := range tests {
    		t.Run(rt.name, func(t *testing.T) {
    			client := clientsetfake.NewSimpleClientset()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jan 14 13:07:56 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/util/proxy/transport.go

    	}
    
    	if redirect := resp.Header.Get("Location"); redirect != "" {
    		targetURL, err := url.Parse(redirect)
    		if err != nil {
    			return nil, errors.NewInternalError(fmt.Errorf("error trying to parse Location header: %v", err))
    		}
    		resp.Header.Set("Location", t.rewriteURL(targetURL, req.URL, req.Host))
    		return resp, nil
    	}
    
    	cType := resp.Header.Get("Content-Type")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 10 07:29:34 UTC 2023
    - 8.8K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/server/filters/timeout.go

    		requestInfo, ok := apirequest.RequestInfoFrom(ctx)
    		if !ok {
    			// if this happens, the handler chain isn't setup correctly because there is no request info
    			return req, false, func() {}, apierrors.NewInternalError(fmt.Errorf("no request info found for request during timeout"))
    		}
    
    		if longRunning(req, requestInfo) {
    			return req, true, nil, nil
    		}
    
    		postTimeoutFn := func() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 26 16:28:45 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go

    func (r *crdHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
    	ctx := req.Context()
    	requestInfo, ok := apirequest.RequestInfoFrom(ctx)
    	if !ok {
    		responsewriters.ErrorNegotiated(
    			apierrors.NewInternalError(fmt.Errorf("no RequestInfo found in the context")),
    			Codecs, schema.GroupVersion{}, w, req,
    		)
    		return
    	}
    	if !requestInfo.IsResourceRequest {
    		pathParts := splitPath(requestInfo.Path)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 28 19:06:46 UTC 2024
    - 52.9K bytes
    - Viewed (0)
  6. cmd/kubeadm/app/util/config/cluster_test.go

    			},
    			clientSetup: func(clientset *clientsetfake.Clientset) {
    				clientset.PrependReactor("list", "pods", func(action clienttesting.Action) (handled bool, ret runtime.Object, err error) {
    					return true, nil, apierrors.NewInternalError(errors.New("API server down"))
    				})
    			},
    			expectedErr: true,
    		},
    	}
    	for _, rt := range tests {
    		t.Run(rt.name, func(t *testing.T) {
    			client := clientsetfake.NewSimpleClientset()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jan 14 13:07:56 UTC 2024
    - 26.7K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher.go

    	if opts.Recursive && !strings.HasSuffix(key, "/") {
    		key += "/"
    	}
    	if opts.ProgressNotify && w.newFunc == nil {
    		return nil, apierrors.NewInternalError(errors.New("progressNotify for watch is unsupported by the etcd storage because no newFunc was provided"))
    	}
    	startWatchRV, err := w.getStartWatchResourceVersion(ctx, rev, opts)
    	if err != nil {
    		return nil, err
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Sep 25 10:26:38 UTC 2023
    - 18.9K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/watch.go

    		}
    	}()
    
    	flusher, ok := w.(http.Flusher)
    	if !ok {
    		err := fmt.Errorf("unable to start watch - can't get http.Flusher: %#v", w)
    		utilruntime.HandleError(err)
    		s.Scope.err(errors.NewInternalError(err), w, req)
    		return
    	}
    
    	framer := s.Framer.NewFrameWriter(w)
    	if framer == nil {
    		// programmer error
    		err := fmt.Errorf("no stream framing support is available for media type %q", s.MediaType)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Dec 14 16:37:25 UTC 2023
    - 11.4K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator.go

    	"k8s.io/apiserver/pkg/audit"
    	"k8s.io/apiserver/pkg/authentication/authenticator"
    	"k8s.io/apiserver/pkg/warning"
    	"k8s.io/klog/v2"
    	"k8s.io/utils/clock"
    )
    
    var errAuthnCrash = apierrors.NewInternalError(errors.New("authentication failed unexpectedly"))
    
    const sharedLookupTimeout = 30 * time.Second
    
    // cacheRecord holds the three return values of the authenticator.Token AuthenticateToken method
    type cacheRecord struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/storage/etcd3/watcher_test.go

    	}{
    		{
    			name:        "no newFunc provided",
    			setupFn:     func(opts *setupOptions) { opts.newFunc = nil },
    			requestOpts: storage.ListOptions{ProgressNotify: true},
    			expectedErr: apierrors.NewInternalError(errors.New("progressNotify for watch is unsupported by the etcd storage because no newFunc was provided")),
    		},
    	}
    	for _, scenario := range scenarios {
    		t.Run(scenario.name, func(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 12.3K bytes
    - Viewed (0)
Back to top