IAM - Fix error messages for resource permissions endpoints (#85773)
* IAM: fix many error messages in access-related code to provide more information * Remove debug statement * Refactor resourcepermissions package to use errutil * Replace a few more errors with errutil and wrap errors found in users and teams services * Apply diff of openAPI spec
This commit is contained in:
@@ -388,7 +388,7 @@ func ValidateBuiltInRoles(builtInRoles []string) error {
|
||||
return ErrNoneRoleAssignment
|
||||
}
|
||||
if !org.RoleType(br).IsValid() && br != RoleGrafanaAdmin {
|
||||
return fmt.Errorf("'%s' %w", br, ErrInvalidBuiltinRole)
|
||||
return ErrInvalidBuiltinRole.Build(ErrInvalidBuiltinRoleData(br))
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user