github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/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 }