bytedance/deer-flow · warning

Failed to list uploaded files

Error message

Failed to list uploaded files

What it means

listUploadedFiles GETs /api/threads/{threadId}/uploads/list to enumerate a thread's uploaded files, throwing on any non-ok response with the gateway's detail or the 'Failed to list uploaded files' fallback.

Source

Thrown at frontend/src/core/uploads/api.ts:104

      await readErrorDetail(response, "Failed to load upload limits"),
    );
  }

  return response.json();
}

/**
 * List all uploaded files for a thread
 */
export async function listUploadedFiles(
  threadId: string,
): Promise<ListFilesResponse> {
  const response = await fetch(
    `${getBackendBaseURL()}/api/threads/${threadId}/uploads/list`,
  );

  if (!response.ok) {
    throw new Error(
      await readErrorDetail(response, "Failed to list uploaded files"),
    );
  }

  return response.json();
}

/**
 * Delete an uploaded file
 */
export async function deleteUploadedFile(
  threadId: string,
  filename: string,
): Promise<{ success: boolean; message: string }> {
  const encodedFilename = encodeURIComponent(filename);
  const response = await fetch(
    `${getBackendBaseURL()}/api/threads/${threadId}/uploads/${encodedFilename}`,
    {

View on GitHub (pinned to 1dd6ba1acb)

Solutions

  1. Confirm the /uploads/list status code in the Network tab.
  2. 404: treat as 'no files' if the thread is known-deleted, otherwise correct the thread id.
  3. 401: re-auth and refetch.
  4. 5xx: check gateway logs and the storage backend mount.

Example fix

// before: any failure surfaces as an error toast
const files = await listUploadedFiles(threadId);

// after: 404 degrades to an empty list
const res = await fetch(url);
if (res.status === 404) { return { files: [] }; }
Defensive patterns

Strategy: fallback

Try / catch

let files: ListFilesResponse;
try { files = await listUploadedFiles(threadId); } catch (e) { if (isNotFound(e)) files = { files: [] }; else { toast(e.message); files = { files: [] }; } }

Prevention

When it happens

Trigger: Listing files for a deleted thread (404), expired session (401), or gateway storage error (5xx). Also triggered when the route is absent because uploads are disabled in this deployment.

Common situations: Opening a thread's attachments panel after the thread was pruned server-side; background tab with a stale session triggering the list query on focus.

Related errors


AI-assisted analysis of bytedance/deer-flow@1dd6ba1acb (2026-08-14). Data as JSON: /api/errors/fe5ede53f8472a78. Report an issue: GitHub.