- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 54 for NewInternalError (0.18 sec)
-
staging/src/k8s.io/apiserver/pkg/storage/errors/storage.go
return errors.NewServerTimeout(qualifiedResource, "list", 2) // TODO: make configurable or handled at a higher level case storage.IsInternalError(err): return errors.NewInternalError(err) default: return err } } // InterpretGetError converts a generic error on a retrieval // operation into the appropriate API error.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Nov 08 15:39:10 UTC 2023 - 4.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go
return nil, apierrors.NewInternalError(err) } } else { // Subsequent call, convert existing versioned attributes to the requested version if err := admission.ConvertVersionedAttributes(v.versionedAttr, gvk, v.objectInterfaces); err != nil { return nil, apierrors.NewInternalError(err) } } return v.versionedAttr, nil }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 28 08:48:22 UTC 2024 - 19.6K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/predicates/namespace/matcher.go
if err != nil { return false, apierrors.NewInternalError(err) } if selector.Empty() { return true, nil } namespaceLabels, err := m.GetNamespaceLabels(attr) // this means the namespace is not found, for backwards compatibility, // return a 404 if apierrors.IsNotFound(err) { status, ok := err.(apierrors.APIStatus) if !ok { return false, apierrors.NewInternalError(err) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Jul 15 00:53:08 UTC 2023 - 4.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/errors.go
// do not double wrap an error of same type if apierrors.IsForbidden(internalError) { return internalError } name, resource, err := extractResourceName(a) if err != nil { return apierrors.NewInternalError(utilerrors.NewAggregate([]error{internalError, err})) } return apierrors.NewForbidden(resource, name, internalError) } // NewNotFound is a utility function to return a well-formatted admission control error response
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jul 26 19:40:51 UTC 2017 - 2.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/registry/generic/rest/response_checker.go
defer resp.Body.Close() bodyBytes, err := ioutil.ReadAll(io.LimitReader(resp.Body, maxReadLength)) if err != nil { return errors.NewInternalError(err) } bodyText := string(bodyBytes) switch { case resp.StatusCode == http.StatusInternalServerError: return errors.NewInternalError(fmt.Errorf("%s", bodyText)) case resp.StatusCode == http.StatusBadRequest: return errors.NewBadRequest(bodyText)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Feb 03 06:33:43 UTC 2017 - 2.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/registry/rest/create.go
if !metav1.HasObjectMetaSystemFieldValues(objectMeta) { return errors.NewInternalError(fmt.Errorf("system metadata was not initialized")) } // ensure the name has been generated if len(objectMeta.GetGenerateName()) > 0 && len(objectMeta.GetName()) == 0 { return errors.NewInternalError(fmt.Errorf("metadata.name was not generated")) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Sep 27 11:48:28 UTC 2022 - 9.1K bytes - Viewed (0) -
pkg/webhooks/validation/controller/controller_test.go
LongRetry, ) webhooks.Delete(unpatchedWebhookConfig.Name, "") // verify the webhook is updated after the controller can confirm invalid config is rejected. gatewayError.Store(ptr.Of[error](kerrors.NewInternalError(errors.New("unknown error")))) webhooks.Create(unpatchedWebhookConfig) assert.EventuallyEqual( t, fetch(unpatchedWebhookConfig.Name), webhookConfigWithCABundleIgnore,
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Jan 05 03:21:04 UTC 2024 - 11.8K bytes - Viewed (0) -
plugin/pkg/admission/namespace/exists/admission.go
} if !errors.IsNotFound(err) { return errors.NewInternalError(err) } // in case of latency in our caches, make a call direct to storage to verify that it truly exists or not _, err = e.client.CoreV1().Namespaces().Get(context.TODO(), a.GetNamespace(), metav1.GetOptions{}) if err != nil { if errors.IsNotFound(err) { return err } return errors.NewInternalError(err) } return nil }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Feb 08 02:16:47 UTC 2020 - 3.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/proxy/streamtranslator.go
if err != nil { websocketStreams.writeStatus(apierrors.NewInternalError(err)) //nolint:errcheck metrics.IncStreamTranslatorRequest(req.Context(), strconv.Itoa(http.StatusInternalServerError)) return } spdyExecutor, err := remotecommand.NewSPDYExecutorRejectRedirects(spdyRoundTripper, spdyRoundTripper, "POST", h.Location) if err != nil { websocketStreams.writeStatus(apierrors.NewInternalError(err)) //nolint:errcheck
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Feb 27 23:21:55 UTC 2024 - 6.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/admission.go
} var ( exists bool err error ) namespace, err := l.namespaceLister.Get(a.GetNamespace()) if err != nil { if !errors.IsNotFound(err) { return errors.NewInternalError(err) } } else { exists = true } if !exists && a.GetOperation() == admission.Create { // give the cache time to observe the namespace before rejecting a create.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Sep 15 09:52:18 UTC 2021 - 8.6K bytes - Viewed (0)