mirror of
https://github.com/kyverno/kyverno.git
synced 2025-01-20 18:52:16 +00:00
baacf60156
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
17 lines
395 B
Go
17 lines
395 B
Go
package openapi
|
|
|
|
import "k8s.io/apimachinery/pkg/util/runtime"
|
|
|
|
func overrideRuntimeErrorHandler() {
|
|
if len(runtime.ErrorHandlers) > 0 {
|
|
runtime.ErrorHandlers[0] = func(err error) {
|
|
logger.V(6).Info("runtime error", "msg", err.Error())
|
|
}
|
|
} else {
|
|
runtime.ErrorHandlers = []func(err error){
|
|
func(err error) {
|
|
logger.V(6).Info("runtime error", "msg", err.Error())
|
|
},
|
|
}
|
|
}
|
|
}
|