docs: def log_and_reraise_smt_request_failed(action=None):
      """Catch SDK base exception and print error log before reraise exception.
  
      msg: the error message to be logged.
      """
      try:
          yield
      except exception.SDKSMTRequestFailed as err:
          msg = ''
          if action is not None:
              msg = "Failed to %s. " % action
          msg += "SMT error: %s" % err.format_message()
          LOG.error(msg)
          raise exception.SDKSMTRequestFailed(err.results, msg)