Mintplex-Labs/anything-llm · warning · Error

Could not update status.

Error message

Could not update status.

What it means

Thrown by LiveDocumentSync.toggleFeature when the POST to /experimental/toggle-live-sync returns non-OK, with the fixed string 'Could not update status.'. The .catch returns false, so callers see only a boolean failure with no reason. The method also references a featureFlag ('experimental_live_file_sync') hinting this is gated server-side.

Source

Thrown at frontend/src/models/experimental/liveSync.js:13

import { API_BASE } from "@/utils/constants";
import { baseHeaders } from "@/utils/request";

const LiveDocumentSync = {
  featureFlag: "experimental_live_file_sync",
  toggleFeature: async function (updatedStatus = false) {
    return await fetch(`${API_BASE}/experimental/toggle-live-sync`, {
      method: "POST",
      headers: baseHeaders(),
      body: JSON.stringify({ updatedStatus }),
    })
      .then((res) => {
        if (!res.ok) throw new Error("Could not update status.");
        return true;
      })
      .then((res) => res)
      .catch((e) => {
        console.error(e);
        return false;
      });
  },
  queues: async function () {
    return await fetch(`${API_BASE}/experimental/live-sync/queues`, {
      headers: baseHeaders(),
    })
      .then((res) => {
        if (!res.ok) throw new Error("Could not update status.");
        return res.json();
      })
      .then((res) => res?.queues || [])
      .catch((e) => {

View on GitHub (pinned to 526360e320)

Solutions

  1. Confirm the caller has admin rights and the experimental flag is enabled tenant-wide.
  2. Send updatedStatus as a strict boolean.
  3. Inspect the network response for the real status code.
  4. Reload the feature-flag state after a failure to re-sync UI with backend.

Example fix

// before
const ok = await LiveDocumentSync.toggleFeature(next);
if (!ok) showToast('Failed', 'error');

// after
const ok = await LiveDocumentSync.toggleFeature(Boolean(next));
if (!ok) showToast('Could not toggle live sync - check permissions and feature flag', 'error');
Defensive patterns

Strategy: validation

Validate before calling

function validateToggleArgs(next) {
  if (typeof next !== 'boolean') return 'updatedStatus must be boolean';
  return null;
}

Type guard

/** @param {unknown} r */
function isToggleResult(r) { return typeof r === 'boolean'; }

Try / catch

const ok = await LiveDocumentSync.toggleFeature(next);
if (!ok) showToast('Could not toggle live sync - check feature flag and permissions', 'error');

Prevention

When it happens

Trigger: updatedStatus payload rejected; experimental_live_file_sync flag disabled for this user/tenant; non-admin caller; backend route moved between releases.

Common situations: Non-admin user toggling an experimental feature; tenant-level flag off; frontend built against an older API path than the running backend; race where another admin changed the flag concurrently.

Related errors


AI-assisted analysis of Mintplex-Labs/anything-llm@526360e320 (2026-08-13). Data as JSON: /api/errors/17daf20d47d97186. Report an issue: GitHub.