github.com/prebid/prebid-server/v2@v2.18.0/errortypes/scope.go (about)

     1  package errortypes
     2  
     3  type Scope int
     4  
     5  const (
     6  	ScopeAny Scope = iota
     7  	ScopeDebug
     8  )
     9  
    10  type Scoped interface {
    11  	Scope() Scope
    12  }
    13  
    14  func ReadScope(err error) Scope {
    15  	if e, ok := err.(Scoped); ok {
    16  		return e.Scope()
    17  	}
    18  	return ScopeAny
    19  }