Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for StatusNotAcceptable (0.22 sec)

  1. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/writers_test.go

    			mediaType:   "application/json",
    			req:         &http.Request{Header: http.Header{}, URL: &url.URL{Path: "/path"}},
    			statusCode:  http.StatusNotAcceptable,
    			wantCode:    http.StatusNotAcceptable,
    			wantHeaders: http.Header{"Content-Type": []string{"text/plain"}},
    			wantBody:    []byte("NotFound:  \"test\" not found"),
    		},
    
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/util/webhook/webhook_test.go

    			json.NewEncoder(w).Encode(apierrors.NewInternalError(fmt.Errorf("nope")))
    		case 3:
    			// HTTP error that is not retryable
    			w.WriteHeader(http.StatusNotAcceptable)
    			json.NewEncoder(w).Encode(apierrors.NewGenericServerResponse(http.StatusNotAcceptable, "get", gr, "testing", "nope", 0, false))
    		case 4:
    			// Successful request
    			w.WriteHeader(http.StatusOK)
    			json.NewEncoder(w).Encode(map[string]string{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 29 15:48:39 UTC 2023
    - 25.8K bytes
    - Viewed (0)
  3. cmd/object-lambda-handlers.go

    	"Forbidden":                       http.StatusForbidden,
    	"Not Found":                       http.StatusNotFound,
    	"Method Not Allowed":              http.StatusMethodNotAllowed,
    	"Not Acceptable":                  http.StatusNotAcceptable,
    	"Proxy Authentication Required":   http.StatusProxyAuthRequired,
    	"Request Timeout":                 http.StatusRequestTimeout,
    	"Conflict":                        http.StatusConflict,
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/api/errors/errors.go

    	case http.StatusForbidden:
    		reason = metav1.StatusReasonForbidden
    		// the server message has details about who is trying to perform what action.  Keep its message.
    		message = serverMessage
    	case http.StatusNotAcceptable:
    		reason = metav1.StatusReasonNotAcceptable
    		// the server message has details about what types are acceptable
    		if len(serverMessage) == 0 || serverMessage == "unknown" {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 21 03:41:32 UTC 2022
    - 30.5K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/response.go

    }
    
    func (e errNotAcceptable) Error() string {
    	return e.message
    }
    
    func (e errNotAcceptable) Status() metav1.Status {
    	return metav1.Status{
    		Status:  metav1.StatusFailure,
    		Code:    http.StatusNotAcceptable,
    		Reason:  metav1.StatusReason("NotAcceptable"),
    		Message: e.Error(),
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 18 09:07:03 UTC 2023
    - 16.5K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiextensions-apiserver/test/integration/yaml_test.go

    			t.Fatal(v, ok, err, string(result))
    		}
    		if v, ok, err := unstructured.NestedFloat64(obj.Object, "code"); v != http.StatusNotAcceptable || !ok || err != nil {
    			t.Fatal(v, ok, err, string(result))
    		}
    	}
    
    	// Update
    	{
    		yamlBody := []byte(fmt.Sprintf(`
    apiVersion: %s
    kind: %s
    metadata:
      name: mytest
      uid: %s
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 02 19:34:41 UTC 2021
    - 16.5K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go

    }
    
    func (e errNotMarshalable) Status() metav1.Status {
    	return metav1.Status{
    		Status:  metav1.StatusFailure,
    		Code:    http.StatusNotAcceptable,
    		Reason:  metav1.StatusReason("NotAcceptable"),
    		Message: e.Error(),
    	}
    }
    
    // IsNotMarshalable checks the type of error, returns a boolean true if error is not nil and not marshalable false otherwise
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 23 13:38:23 UTC 2022
    - 17.8K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/endpoints/watch_test.go

    	response, err := client.Do(request)
    	if err != nil {
    		t.Errorf("unexpected error: %v", err)
    	}
    
    	// TODO: once this is fixed, this test will change
    	if response.StatusCode != http.StatusNotAcceptable {
    		t.Errorf("Unexpected response %#v", response)
    	}
    }
    
    func TestWatchParamParsing(t *testing.T) {
    	simpleStorage := &SimpleRESTStorage{}
    	handler := handle(map[string]rest.Storage{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Nov 30 17:27:39 UTC 2023
    - 30K bytes
    - Viewed (0)
Back to top