{"record":{"id":"657871868f03da80","repo":"ComposioHQ/composio","slug":"error-message-upstream-badrequesterror-acl-onl-657871","errorCode":null,"errorMessage":"${error.message (upstream BadRequestError: ACL only allowed for shared connections)}","messagePattern":"\\$\\{error\\.message \\(upstream BadRequestError: ACL only allowed for shared connections\\)\\}","errorType":"exception","errorClass":"ComposioAclOnlyForSharedError","httpStatus":400,"severity":"error","filePath":"ts/packages/core/src/models/Experimental.ts","lineNumber":123,"sourceCode":"      cause: parsedParams.error,\n    });\n  }\n\n  const body: ConnectedAccountPatchParams = {\n    experimental: {\n      acl_config_for_shared: serializeAclConfigForWire(parsedParams.data),\n    },\n  };\n\n  try {\n    return await client.connectedAccounts.patch(nanoid, body);\n  } catch (error) {\n    if (\n      error instanceof BadRequestError &&\n      typeof error.message === 'string' &&\n      error.message.includes(ACL_ONLY_FOR_SHARED_ERROR_FRAGMENT)\n    ) {\n      throw new ComposioAclOnlyForSharedError(error.message, { cause: error });\n    }\n    throw error;\n  }\n}\n\nexport class Experimental {\n  private client: ComposioClient;\n\n  constructor(client: ComposioClient) {\n    this.client = client;\n    telemetry.instrument(this, 'Experimental');\n  }\n\n  /**\n   * Compatibility alias for `composio.connectedAccounts.updateAcl(...)`.\n   * Update the per-user ACL on a SHARED connected account.\n   * **Experimental — shape may change in future releases.**\n   *","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/ComposioHQ/composio/blob/64b1b85502b1beeb2379e6c9e8bf1104504fa637/ts/packages/core/src/models/Experimental.ts#L105-L141","documentation":"The backend rejected the ACL update with a BadRequestError indicating ACL is only allowed for shared connections; the SDK re-maps this to the more specific ComposioAclOnlyForSharedError so callers can handle it precisely.","triggerScenarios":"Calling updateAcl on a connected account that is not a shared connection — the API returns 400 with a message containing the 'ACL only allowed for shared connections' fragment, which updateConnectedAccountAcl catches and rethrows as ComposioAclOnlyForSharedError.","commonSituations":"Applying ACL controls to a per-user connected account created normally; promoting a shared-connections feature onto existing accounts; backend policy changes on which connections support ACL.","solutions":["Verify the connected account is a shared connection before calling updateAcl","Recreate the connection as a shared connection if ACL management is required","Catch ComposioAclOnlyForSharedError specifically and skip/handle non-shared accounts"],"exampleFix":"// before\nawait account.updateAcl({ enabled: true });\n// after\nif (account.connectionType === 'shared') {\n  await account.updateAcl({ enabled: true });\n}","handlingStrategy":"try-catch","validationCode":"if (account.connectionType !== 'shared') { throw new Error('skip ACL: not a shared connection'); }","typeGuard":null,"tryCatchPattern":"try { await account.updateAcl(params); } catch (e) { if (e instanceof ComposioAclOnlyForSharedError) { /* skip or convert to shared */ return; } throw e; }","preventionTips":["Check the connection's shared flag before calling updateAcl","Listen for ComposioAclOnlyForSharedError as a control-flow signal","Keep ACL management flows separate from per-user account flows"],"tags":["acl","connected-accounts","shared-connections","api-error"],"backgroundTag":"operation-not-permitted","analyzedSha":"64b1b85502b1beeb2379e6c9e8bf1104504fa637","analyzedAt":"2026-08-28T15:39:33.623Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}