code: func (diags Diagnostics) HasErrors() bool {
  	for _, diag := range diags {
  		if diag.Severity() == Error {
  			return true
  		}
  	}
  	return false
  }
docs: // HasErrors returns true if any of the diagnostics in the list have
  // a severity of Error.