code: def check_message(keywords, message):
      
      exc_type, exc_value, exc_traceback = sys.exc_info()
      if set(str(exc_value).split(" ")).issuperset(set(keywords)):
          exc_value.message = message
          raise
docs: Checks an exception for given keywords and raises a new ``ActionError``
      with the desired message if the keywords are found. This allows selective
      control over API error messages.