code: def _dbus_exception_to_reason(exc, args):
      '''
      Returns a error message from a snapper DBusException
      '''
      error = exc.get_dbus_name()
      if error == 'error.unknown_config':
          return "Unknown configuration '{0}'".format(args['config'])
      elif error == 'error.illegal_snapshot':
          return 'Invalid snapshot'
      else:
          return exc.get_dbus_name(f _dbus_exception_to_reason(exc, args):
      '''
      Returns a error message from a snapper DBusException
      '''
      error = exc.get_dbus_name()
      if error == 'error.unknown_config':
          return "Unknown configuration '{0}'".format(args['config'])
      elif error == 'error.illegal_snapshot':
          return 'Invalid snapshot'
      else:
          return exc.get_dbus_name()
docs: Returns a error message from a snapper DBusException