infiniflow/ragflow · warning · Error

Failed to create memory

Error message

Failed to create memory

What it means

HttpError from the validation call with any status other than 401/403 (400, 404, 429, 5xx…). Message interpolates the status and the raw Google error body, so the embedded text identifies the exact API problem. Wrapped as ConnectorValidationError.

Source

Thrown at web/src/pages/memories/hooks.ts:40

import {
  CreateMemoryResponse,
  DeleteMemoryProps,
  DeleteMemoryResponse,
  ICreateMemoryProps,
  IMemory,
  IMemoryAppDetailProps,
  MemoryDetailResponse,
  MemoryListResponse,
} from './interface';

export const useCreateMemory = () => {
  const { t } = useTranslation();

  const createMemory = useCallback(
    async (props: ICreateMemoryProps): Promise<CreateMemoryResponse> => {
      const { data: response } = await memoryService.createMemory(props);
      if (response.code !== 0) {
        throw new Error(response.message || 'Failed to create memory');
      }
      if (response.code === 0) {
        message.success(t('message.created'));
      }
      return response.data;
    },
    [t],
  );

  return { createMemory };
};

export const useFetchMemoryList = () => {
  const { handleInputChange, searchString, pagination, setPagination } =
    useHandleSearchChange();
  const { filterValue, handleFilterSubmit } = useHandleFilterSubmit();
  const debouncedSearchString = useDebounce(searchString, { wait: 500 });

View on GitHub (pinned to 554fb1133a)

Solutions

  1. Read the embedded status+body: 429 → back off and retry validation later; 5xx → retry after a short delay
  2. For quota errors, raise per-user rate limits in GCP or spread validation across time
  3. Confirm the credential is not a shared-drive-only service account if get_root_folder_id is the failing call
  4. If persistent, capture the raw HttpError with e.resp and inspect reason in the JSON body

Example fix

# before: single validation attempt on a 429/503
validate_connector_settings()  # ConnectorValidationError(status=429)

# after: retry with backoff on transient statuses
import time
for attempt in range(3):
    try:
        connector.validate_connector_settings()
        break
    except ConnectorValidationError as e:
        if 'status=429' not in str(e) and 'status=5' not in str(e):
            raise
        time.sleep(2 ** attempt)
Defensive patterns

Strategy: retry

Validate before calling

TRANSIENT = {429, 500, 503}

def is_transient(status: int | None) -> bool:
    return status in TRANSIENT

Try / catch

import time
from common.data_source.exceptions import ConnectorValidationError

last = None
for attempt in range(4):
    try:
        connector.validate_connector_settings()
        break
    except ConnectorValidationError as e:
        last = e
        if not any(f"status={s}" in str(e) for s in TRANSIENT):
            raise
        time.sleep(2 ** attempt)
else:
    raise last

Prevention

When it happens

Trigger: Drive files().list returning 400 (malformed query), 429 quota/rate limit, 500/503 transient Google outages, or the service-account follow-up get_root_folder_id call failing on a shared drive without accessible root.

Common situations: Project over quota or rate-limited during bulk validation sweeps, Google API transient 503s, using an API version retired client-side, shared-drive-only service accounts whose My-Drive root is inaccessible.

Related errors


AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15). Data as JSON: /api/errors/c331fe9a75efd353. Report an issue: GitHub.