paperclipai/paperclip · error

Request body must include { "disabled": true|false }.

Error message

Request body must include { "disabled": true|false }.

What it means

Body-shape guard on PATCH /api/adapters/:type: the enable/disable toggle requires a boolean 'disabled' field, but the body omits it or supplies a non-boolean, so the route returns 400 without mutating adapter state.

Source

Thrown at server/src/routes/adapters.ts:458

    res.json(buildAdapterInfo(adapter, externalRecord, disabledSet));
  });

  /**
   * PATCH /api/adapters/:type
   *
   * Enable or disable an adapter. Disabled adapters are hidden from agent
   * creation menus but remain functional for existing agents.
   *
   * Request body: { "disabled": boolean }
   */
  router.patch("/adapters/:type", async (req, res) => {
    assertInstanceAdmin(req);

    assertAdapterManagementVisible();

    const adapterType = req.params.type;
    const { disabled } = req.body as { disabled?: boolean };

    if (typeof disabled !== "boolean") {
      res.status(400).json({ error: "Request body must include { \"disabled\": true|false }." });
      return;
    }

    // Check that the adapter exists in the registry
    const existing = findServerAdapter(adapterType);
    if (!existing) {
      res.status(404).json({ error: `Adapter "${adapterType}" is not registered.` });
      return;
    }

    const changed = setAdapterDisabled(adapterType, disabled);

    if (changed) {
      logger.info({ type: adapterType, disabled }, "Adapter enabled/disabled");
    }

View on GitHub (pinned to 5716fe907e)

Solutions

  1. Send a request body of the form {"disabled": true} or {"disabled": false}.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/src/routes/adapters.ts:405 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@5716fe907e (2026-08-18). Data as JSON: /api/errors/847c568216b6e611. Report an issue: GitHub.