{"record":{"id":"970c0dd27c0b6979","repo":"appsmithorg/appsmith","slug":"could-not-find-action-to-copy","errorCode":null,"errorMessage":"Could not find action to copy","messagePattern":"Could not find action to copy","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"app/client/src/sagas/ActionSagas.ts","lineNumber":787,"sourceCode":"  if (!parentEntityId || !parentEntityKey) return;\n\n  const newName: string = yield select(getNewEntityName, {\n    prefix: name,\n    parentEntityId: destinationEntityId,\n    parentEntityKey,\n    suffix: \"Copy\",\n    startWithoutIndex: true,\n  });\n\n  const destinationEntityIdInfo = generateDestinationIdInfoForQueryDuplication(\n    destinationEntityId,\n    parentEntityKey,\n  );\n\n  if (objectKeys(destinationEntityIdInfo).length === 0) return;\n\n  try {\n    if (!actionObject) throw new Error(\"Could not find action to copy\");\n\n    // At this point the actionObject.id will be the id of the action to be copied\n    // We enhance the payload with eventData to track the action being copied\n    actionObject = enhanceRequestPayloadWithEventData(\n      actionObject,\n      action.type,\n    ) as Action;\n\n    const copyAction = Object.assign({}, actionObject, {\n      name: newName,\n      ...destinationEntityIdInfo,\n    }) as Partial<Action>;\n\n    // Indicates that source of action creation is copy action\n    copyAction.source = ActionCreationSourceTypeEnum.COPY_ACTION;\n\n    delete copyAction.id;\n    delete copyAction.baseId;","sourceCodeStart":769,"sourceCodeEnd":805,"githubUrl":"https://github.com/appsmithorg/appsmith/blob/8cd9021c24cdbea1c3c12c966073708e83db60c2/app/client/src/sagas/ActionSagas.ts#L769-L805","documentation":"Generic Error thrown by the copy-action flow when actionObject is falsy before building the duplicate payload. The source action to copy could not be located by the preceding selectors, so Object.assign and the network call are skipped.","triggerScenarios":"User triggers 'Copy query' on an action whose record was already removed from the store; the source id resolved to undefined due to a selector mismatch; copy invoked during a page switch.","commonSituations":"Right-click copy on a row that was just deleted by a collaborator; git branch switch left stale state; bulk delete outran the copy dispatch.","solutions":["Refresh the page and retry the copy.","Confirm the source action is still listed in the entity explorer before copying.","If reproducing consistently, check that the redux action payload carries a valid source id."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before invoking copy, confirm the source action is present\nif (!sourceAction) {\n  showAlert('Source action not found; refresh and try again', 'error');\n  return;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not delete the source action while a copy is pending.","Refresh the editor after collaborative deletes before copying.","Avoid rapid copy of the same row from multiple tabs."],"tags":["action","copy","stale-state","editor"],"backgroundTag":null,"analyzedSha":"8cd9021c24cdbea1c3c12c966073708e83db60c2","analyzedAt":"2026-08-12T22:14:19.293Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}