ToolJet/ToolJet · error · Error

Failed to update document: ${response.statusText}

Error message

Failed to update document: ${response.statusText}

What it means

Error "Failed to update document: ${response.statusText}" thrown in ToolJet/ToolJet.

Source

Thrown at marketplace/plugins/couchbase/lib/query_operations.ts:75

    throw new Error('Missing required parameters');
  }

  let parsedDocument;
  if (document) {
    parsedDocument = typeof document === 'string' ? JSON.parse(document) : document;
  }

  const dapi_url = `${data_api_url}/v1/buckets/${bucket}/scopes/${scope}/collections/${collection}/documents/${document_id}`;
  const response = await fetch(dapi_url, {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
      Authorization: `Basic ${Buffer.from(`${username}:${password}`).toString('base64')}`,
    },
    body: JSON.stringify(parsedDocument),
  });
  if (!response.ok) {
    throw new Error(`Failed to update document: ${response.statusText}`);
  }
  await response.json().catch((error) => {
    if (!response.ok) {
      throw error;
    }
  });
  return 'Updated successfully';
}

export async function deleteDocument(options: QueryOptions, sourceOptions: SourceOptions) {
  const { bucket, scope, collection, document_id } = options;
  const { username, password, data_api_url } = sourceOptions;
  if (!bucket || !scope || !collection || !document_id) {
    throw new Error('Missing required parameters');
  }
  const dapi_url = `${data_api_url}/v1/buckets/${bucket}/scopes/${scope}/collections/${collection}/documents/${document_id}`;
  const response = await fetch(dapi_url, {
    method: 'DELETE',

View on GitHub (pinned to 20602a8e10)

Solutions

  1. Ensure the document_id exists before updating.
  2. Validate the document JSON body.
  3. Verify write permissions on the collection.

Example fix

Fetch the document first to confirm it exists, then retry the update with a valid JSON body.

When it happens

Trigger: Document update request fails: document missing, CAS conflict, or invalid payload.

Common situations: Defend by verifying the document exists and the body is valid before updating; propagate the server statusText.


AI-assisted analysis of ToolJet/ToolJet@20602a8e10 (2026-08-13). Data as JSON: /api/errors/d8cb27f396364fee. Report an issue: GitHub.