<commit_before><commit_msg>adds error-message util from ui/kubernetes-secrets-engine feature branch (#18107)<commit_after>// accepts an error and returns error.errors joined with a comma, error.message or a fallback message
export default function (error, fallbackMessage = 'An error occurred, please try again') {
  if (error?.errors) {
    return error.errors.join(', ');
  }
  return error?.message || fallbackMessage;
}
{'fraction_non_alphanumeric': 0.10874704491725769, 'fraction_numerical': 0.01182033096926714, 'mean_word_length': 5.057142857142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5299276', 'n_tokens_mistral': 123, 'n_tokens_neox': 114, 'n_words': 41}