ComposioHQ/composio · error · ValidationError

Failed to parse connected account ACL update params

Error message

Failed to parse connected account ACL update params

What it means

The parameters passed to update the ACL of a connected account failed Zod validation against UpdateConnectedAccountAclParamsSchema. The SDK validates experimental ACL params client-side before sending the patch request, and wraps the Zod error as the cause.

Source

Thrown at ts/packages/core/src/models/Experimental.ts:104

  if (aclWire !== undefined) {
    wire.acl_config_for_shared = aclWire;
  }
  return wire;
}

/**
 * `composio.experimental` namespace. Keeps compatibility aliases for
 * experimental surfaces while domain-specific mounts graduate. **Shape may
 * change in future releases.**
 */
export async function updateConnectedAccountAcl(
  client: ComposioClient,
  nanoid: string,
  params: UpdateConnectedAccountAclParams
): Promise<ConnectedAccountPatchResponse> {
  const parsedParams = UpdateConnectedAccountAclParamsSchema.safeParse(params);
  if (!parsedParams.success) {
    throw new ValidationError('Failed to parse connected account ACL update params', {
      cause: parsedParams.error,
    });
  }

  const body: ConnectedAccountPatchParams = {
    experimental: {
      acl_config_for_shared: serializeAclConfigForWire(parsedParams.data),
    },
  };

  try {
    return await client.connectedAccounts.patch(nanoid, body);
  } catch (error) {
    if (
      error instanceof BadRequestError &&
      typeof error.message === 'string' &&
      error.message.includes(ACL_ONLY_FOR_SHARED_ERROR_FRAGMENT)
    ) {

View on GitHub (pinned to 64b1b85502)

Solutions

  1. Inspect error.cause (ZodError) to see exactly which fields failed
  2. Match your params object to UpdateConnectedAccountAclParamsSchema fields and types
  3. Log JSON.stringify(params) before the call and compare against the SDK's exported schema

Example fix

// before
await account.updateAcl({ acl: { enabled: true } });
// after
await account.updateAcl({ enabled: true, users: ['user@corp.com'] }); // per schema fields
Defensive patterns

Strategy: type-guard

Validate before calling

import { UpdateConnectedAccountAclParamsSchema } from '@composio/core';
const check = UpdateConnectedAccountAclParamsSchema.safeParse(params);
if (!check.success) throw new Error(check.error.issues.map(i => `${i.path}: ${i.message}`).join('; '));
await account.updateAcl(params);

Type guard

const isAclParams = (p: unknown): p is UpdateConnectedAccountAclParams =>
  UpdateConnectedAccountAclParamsSchema.safeParse(p).success;

Try / catch

try { await account.updateAcl(params); } catch (e) { if (e instanceof ValidationError && e.message.includes('ACL update params')) { console.error(e.cause); fixParams(); return; } throw e; }

Prevention

When it happens

Trigger: Calling connectedAccount.updateAcl / Experimental.updateConnectedAccountAcl with a malformed params object — wrong field names, missing required fields (e.g. missing scope or user list), or invalid enum values.

Common situations: Typo'd field names from hand-written payloads; passing the raw backend patch body instead of the SDK param shape; schema changes across SDK versions renaming ACL fields.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of ComposioHQ/composio@64b1b85502 (2026-08-28). Data as JSON: /api/errors/19628abe1364e4d8. Report an issue: GitHub.