github.com/giantswarm/apiextensions/v2@v2.6.2/pkg/crd/error.go (about)

     1  package crd
     2  
     3  import "github.com/giantswarm/microerror"
     4  
     5  // conversionFailedError indicates that interface{} to versioned CRD conversion failed
     6  var conversionFailedError = &microerror.Error{
     7  	Kind: "conversionFailedError",
     8  }
     9  
    10  // IsConversionFailed asserts invalidConfigError.
    11  func IsConversionFailed(err error) bool {
    12  	return microerror.Cause(err) == conversionFailedError
    13  }
    14  
    15  // notFoundError indicates that the CRD was not found in the filesystem
    16  var notFoundError = &microerror.Error{
    17  	Kind: "notFoundError",
    18  }
    19  
    20  // IsNotFound asserts notFoundError.
    21  func IsNotFound(err error) bool {
    22  	return microerror.Cause(err) == notFoundError
    23  }