Files
capsule/pkg/webhook/utils/error.go
2021-06-27 22:36:55 +02:00

17 lines
315 B
Go

// Copyright 2020-2021 Clastix Labs
// SPDX-License-Identifier: Apache-2.0
package utils
import (
"net/http"
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
)
func ErroredResponse(err error) *admission.Response {
response := admission.Errored(http.StatusInternalServerError, err)
return &response
}