github.com/wanddynosios/cli/v8@v8.7.9-0.20240221182337-1a92e3a7017f/api/cloudcontroller/ccerror/user_not_found.go (about)

     1  package ccerror
     2  
     3  import (
     4  	"fmt"
     5  
     6  	"code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant"
     7  )
     8  
     9  // UserNotFoundError is returned when a role does not exist.
    10  type UserNotFoundError struct {
    11  	Username string
    12  	Origin   string
    13  }
    14  
    15  func (e UserNotFoundError) Error() string {
    16  	if e.Origin != "" && e.Origin != constant.DefaultOriginUaa {
    17  		return fmt.Sprintf("User '%s' with origin '%s' does not exist.", e.Username, e.Origin)
    18  	}
    19  
    20  	return fmt.Sprintf("User '%s' does not exist.", e.Username)
    21  }