Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
ea8fbb4
refactor: Share file input parsing between source write tools
DaveHanns Sep 25, 2026
f35326c
feat: Add create-actor-version and delete-actor-version tools
DaveHanns Sep 25, 2026
ca8cb3b
fix: Harden create-actor-version refusals and warnings
DaveHanns Sep 25, 2026
e804bfb
Merge remote-tracking branch 'origin/feat/update-actor-version' into …
DaveHanns Sep 25, 2026
f508e6f
Merge remote-tracking branch 'origin/feat/update-actor-version' into …
DaveHanns Sep 25, 2026
3102589
docs: Mark where create-actor-version copies a whole source
DaveHanns Sep 25, 2026
c98a074
Merge branch 'feat/update-actor-version' into feat/actor-version-crea…
DaveHanns Sep 27, 2026
faade45
Merge branch 'feat/update-actor-version' into feat/actor-version-crea…
DaveHanns Sep 28, 2026
61535a9
Merge branch 'feat/update-actor-version' into feat/actor-version-crea…
DaveHanns Sep 29, 2026
9dc2c5d
refactor: Simplify create-actor-version and delete-actor-version
DaveHanns Sep 29, 2026
371f732
refactor: Address review of the create-actor-version and delete-actor…
DaveHanns Sep 29, 2026
a8fe1ec
Merge branch 'feat/update-actor-version' into feat/actor-version-crea…
DaveHanns Sep 29, 2026
42a11f9
Merge branch 'feat/update-actor-version' into feat/actor-version-crea…
DaveHanns Sep 29, 2026
2d13f57
Merge branch 'feat/update-actor-version' into feat/actor-version-crea…
DaveHanns Sep 30, 2026
c1be6db
Merge branch 'feat/update-actor-version' into feat/actor-version-crea…
DaveHanns Sep 30, 2026
19a04c5
test: Cover the copy body, secret env vars, Git and gist refusals, an…
DaveHanns Sep 30, 2026
e2d0c4b
test: Cover the exact version deleted, the required versionNumber, an…
DaveHanns Sep 30, 2026
2930937
test: Cover the copied version, the POSTed paths, and a cancel during…
DaveHanns Sep 30, 2026
e3c193b
Merge branch 'feat/update-actor-version' into feat/actor-version-crea…
DaveHanns Sep 30, 2026
766d4a2
Merge branch 'feat/update-actor-version' into feat/actor-version-crea…
DaveHanns Oct 1, 2026
b7369c1
test: Expect the new refusal wording in create-actor-version
DaveHanns Oct 1, 2026
af303f9
Merge branch 'feat/update-actor-version' into feat/actor-version-crea…
DaveHanns Oct 5, 2026
67ad039
Merge branch 'feat/update-actor-version' into feat/actor-version-crea…
DaveHanns Oct 7, 2026
a9b7ca4
fix: Refuse in create-actor-version the files create-actor refuses
DaveHanns Oct 7, 2026
128e2cd
fix: Say that a retried create-actor-version POST may have created th…
DaveHanns Oct 7, 2026
3b03724
fix: Report a taken version number and the last-version refusal witho…
DaveHanns Oct 7, 2026
d8941fa
fix: Tell the agent to build the version instead of saying runs use i…
DaveHanns Oct 7, 2026
5fe2c29
test: Check that a version from files and a delete work beside a vers…
DaveHanns Oct 7, 2026
6d7544b
docs: Say which source tools refuse a version not stored as files
DaveHanns Oct 7, 2026
692396a
test: Add live cases for create-actor-version and delete-actor-version
DaveHanns Oct 7, 2026
06466d7
test: Add live cases for a version from files and a copy of a version…
DaveHanns Oct 7, 2026
ccb1b1d
fix: Name get-actor-version in the retried-POST message only when the…
DaveHanns Oct 7, 2026
462926a
Merge branch 'feat/update-actor-version' into feat/actor-version-crea…
DaveHanns Oct 7, 2026
9764dac
Merge branch 'feat/update-actor-version' into feat/actor-version-crea…
DaveHanns Oct 7, 2026
b249f63
test: Expect the create-actor-version reply to say to build the versi…
DaveHanns Oct 7, 2026
247396e
fix: Name the secret env vars a copy of a version leaves out
DaveHanns Oct 7, 2026
a59d0fe
fix: Say a deleted version cannot be restored, and delete one only wh…
DaveHanns Oct 7, 2026
deeff15
fix: Say that runs with a deleted version's build tag still use its b…
DaveHanns Oct 7, 2026
f5c66f6
test: Expect the secret env var warning on a copy and no next step af…
DaveHanns Oct 7, 2026
1226be3
fix: Name the tags that point to a deleted version's builds, not its …
DaveHanns Oct 7, 2026
c1b1ab3
fix: Say to build a copy after setting its secret env vars, even when…
DaveHanns Oct 7, 2026
bfc3002
fix: Say runs keep using the tagged build while a working copy changes
DaveHanns Oct 7, 2026
49a45b7
docs: Make the Actor source feature line one plain list
DaveHanns Oct 7, 2026
80a02b9
Merge branch 'feat/update-actor-version' into feat/actor-version-crea…
DaveHanns Oct 7, 2026
7e93ae0
Merge branch 'feat/update-actor-version' into feat/actor-version-crea…
DaveHanns Oct 12, 2026
4104f74
fix: Keep file content out of the logged arguments of create-actor-ve…
DaveHanns Oct 12, 2026
7babd1e
test: Expect create-actor-version to refuse control characters in fil…
DaveHanns Oct 12, 2026
ee7edac
test: Expect create-actor-version to start no build when cancelled du…
DaveHanns Oct 12, 2026
80ccf3a
Merge branch 'feat/update-actor-version' into feat/actor-version-crea…
DaveHanns Oct 12, 2026
e4467e8
test: Expect create-actor-version to check 20,000 file paths within a…
DaveHanns Oct 12, 2026
7805844
fix: Report the version count and size limits as the platform's refusal
DaveHanns Oct 12, 2026
8388670
fix: Say that the build create-actor-version started has no secret en…
DaveHanns Oct 12, 2026
bbeec7b
fix: Tell delete-actor-version callers to build once per tag
DaveHanns Oct 12, 2026
69e701e
fix: Name the copied version and left-out secrets after a retried cre…
DaveHanns Oct 12, 2026
35f7f6e
fix: Say a running build of a deleted version still takes its tag
DaveHanns Oct 12, 2026
6c9fd7e
test: Expect create-actor-version cancelled during the POST to respon…
DaveHanns Oct 12, 2026
dceec34
docs: Give the missing copy endpoint as the reason create-actor-versi…
DaveHanns Oct 12, 2026
852d851
fix: Say the build create-actor-version started takes its tag only if…
DaveHanns Oct 12, 2026
ffd8d30
test: Name the delete-actor-version test for build 0.10.1 in plain words
DaveHanns Oct 12, 2026
475cca4
Merge branch 'feat/update-actor-version' into feat/actor-version-crea…
DaveHanns Oct 16, 2026
235da6a
fix: State facts instead of next calls in create- and delete-actor-ve…
DaveHanns Oct 16, 2026
9547753
fix: Mark create-actor-version as open-world
DaveHanns Oct 16, 2026
6e0e0c4
refactor: Drop the post-POST cancel check in create-actor-version
DaveHanns Oct 16, 2026
8437d50
fix: Say that create- and delete-actor-version take a bare Actor name
DaveHanns Oct 16, 2026
f715210
test: Expect create-actor-version to refuse a lone UTF-16 surrogate i…
DaveHanns Oct 16, 2026
ce964c0
Merge branch 'feat/update-actor-version' into feat/actor-version-crea…
DaveHanns Oct 16, 2026
e6fac33
fix: State where the secret env vars can be set as a fact in create-a…
DaveHanns Oct 16, 2026
edad6af
test: Call the delete-actor-version tag text a note in test names
DaveHanns Oct 16, 2026
034423d
fix: Mark create-actor-version as destructive
DaveHanns Oct 16, 2026
6aa9ff1
test: Report versions-size-exceeded on the update-actor-version PUT
DaveHanns Oct 16, 2026
74a901c
fix: Name the Actor's only version when delete-actor-version is refused
DaveHanns Oct 16, 2026
c456e01
feat: Take an optional expectedRevision in delete-actor-version
DaveHanns Oct 16, 2026
5552111
feat: Return the version's build tag in get-actor-version
DaveHanns Oct 16, 2026
d522214
feat: Return the tags of the deleted version's builds in delete-actor…
DaveHanns Oct 16, 2026
bee212c
refactor: Share the create result and retried-POST refusal of the cre…
DaveHanns Oct 16, 2026
1e8d40e
refactor: Narrow the create-actor-version files without a non-null as…
DaveHanns Oct 16, 2026
4d8d435
fix: Say nothing was deleted when a hidden source has no revision to …
DaveHanns Oct 16, 2026
0e0d8bd
docs: Name the build tag and the deleted version's tags in the source…
DaveHanns Oct 16, 2026
8ac7274
Merge branch 'feat/update-actor-version' into feat/actor-version-crea…
DaveHanns Oct 16, 2026
dba34b3
Merge branch 'feat/update-actor-version' into feat/actor-version-crea…
DaveHanns Oct 16, 2026
627be25
Merge branch 'feat/update-actor-version' into feat/actor-version-crea…
DaveHanns Oct 16, 2026
1b51cb9
test: Load the versions category in the version create and delete cases
DaveHanns Oct 16, 2026
d6b4823
style: Sort the imports in the version create and delete tests
DaveHanns Oct 16, 2026
c7c8ab2
Merge branch 'feat/update-actor-version' into feat/actor-version-crea…
DaveHanns Oct 16, 2026
8d51cb9
Merge branch 'feat/update-actor-version' into feat/actor-version-crea…
DaveHanns Oct 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ Here are some special MCP operations and how the Apify MCP Server supports them:
- **Actor tasks**: Create, inspect, and update your saved Actor tasks, and publish or unpublish their public landing pages.
- **Schedules**: Create, inspect, update, and delete schedules that run your Actors and tasks automatically.
- **Builds**: Build an Actor version, list builds, check the status of a build, and retrieve its build log.
- **Actor versions**: Read an Actor version's files with a hash for each file and a revision for the whole set, create an Actor from files, and change a version's files with checks that catch changes made since your last read.
- **Actor versions**: Read an Actor version's files with a hash for each file and a revision for the whole set, create an Actor from files, change a version's files with checks that catch changes made since your last read, add a version from files or as a copy of another version, and delete a version.
- **Apify API**: Search the Apify API reference, inspect an operation, and send requests to the API to read or change data.

### Overview of available tools
Expand Down Expand Up @@ -301,6 +301,8 @@ Legend for the **Enabled by default** column:
| `get-actor-version` | versions | Get an Actor version's file listing with hashes and the content of the files you ask for. | |
| `create-actor` | versions | Create a private Actor in your account from files, optionally starting a build. | |
| `update-actor-version` | versions | Write, edit, or delete files of an Actor version in one all-or-nothing write. | |
| `create-actor-version` | versions | Add a version to an Actor, from files or as a copy of another version, optionally starting a build. | |
| `delete-actor-version` | versions | Delete an Actor version; its builds and their tags stay. | |
| `apify-api-search` | api | Search the Apify API reference for operations by keywords. Returns each one's method, path, and docs page. | |
| `apify-api-details` | api | Get the parameters and request body schema of the Apify API operations on a path. | |
| `apify-api-read` | api | Send a GET request to an Apify API path, such as `actor-runs` or `/v2/actor-runs`, like `apify api` in the Apify CLI. Read-only: it refuses the `method` query parameter and a GET to the synchronous run endpoints, which starts a paid run. | |
Expand Down
6 changes: 6 additions & 0 deletions src/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ export const HELPER_TOOLS = {
ACTOR_TASK_UPDATE: 'update-actor-task',
ACTOR_TASK_PUBLISH: 'publish-actor-task',
ACTOR_TASK_UNPUBLISH: 'unpublish-actor-task',
ACTOR_VERSION_CREATE: 'create-actor-version',
ACTOR_VERSION_DELETE: 'delete-actor-version',
ACTOR_VERSION_GET: 'get-actor-version',
ACTOR_VERSION_UPDATE: 'update-actor-version',
DATASET_GET: 'get-dataset',
Expand Down Expand Up @@ -287,6 +289,10 @@ export const APIFY_ERROR_TYPE_CANNOT_START_ACTOR_RUNS = 'cannot-start-actor-runs
export const APIFY_ERROR_TYPE_CANNOT_PUBLISH_ACTOR_TASK = 'cannot-publish-actor-task';
export const APIFY_ERROR_TYPE_INVALID_INPUT = 'invalid-input';
export const APIFY_ERROR_TYPE_ACTOR_NAME_NOT_UNIQUE = 'actor-name-not-unique';
export const APIFY_ERROR_TYPE_VERSION_ALREADY_EXISTS = 'version-already-exists';
export const APIFY_ERROR_TYPE_TOO_FEW_VERSIONS = 'too-few-versions';
export const APIFY_ERROR_TYPE_TOO_MANY_VERSIONS = 'too-many-versions';
export const APIFY_ERROR_TYPE_VERSIONS_SIZE_EXCEEDED = 'versions-size-exceeded';
export const APIFY_ERROR_TYPE_PAGE_NOT_FOUND = 'page-not-found';

// HTTP status codes
Expand Down
17 changes: 11 additions & 6 deletions src/tools/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,19 @@ direct actor tools, `search-actors`, `fetch-actor-details`) is mode-agnostic.
first, pointing at the newest failed one) and `build-actor` (start a build of one version and wait for it); `build_helpers.ts` holds the
allowlisted build result shape, the build start and wait calls (the wait reports progress), the
shared `waitSecs` field, the shared build response and the by-status next-step text.
- `versions/`: `get-actor-version` (an Actor version's file manifest with hashes, revision, and
requested content), `create-actor` (a new Actor with one version in a single POST), and
- `versions/`: `get-actor-version` (an Actor version's build tag, file manifest with hashes, revision,
and requested content), `create-actor` (a new Actor with one version in a single POST),
`update-actor-version` (write, edit, and delete operations applied all-or-nothing to a fresh read,
stored with one version PUT that carries only the source keys). `source_files.ts` holds the file
shape, the manifest builder, the hash and revision rules, and the text-or-base64 detection;
stored with one version PUT that carries only the source keys), `create-actor-version` (a new
version in one POST, from files or as a copy of another version's files and non-secret env vars,
with no default buildTag), and `delete-actor-version` (reads the Actor first, since apify-client
reports a delete of a missing version as done, and returns the tags still on its builds). `source_files.ts` holds the file shape, the
manifest builder, the hash and revision rules, and the text-or-base64 detection;
`source_helpers.ts` holds the Actor and version lookup, the file input shape, and the response
after a write, which starts the build for autoBuild. Versions not stored as files (Git repository,
gist, or zip) are refused.
after a write, which starts the build for autoBuild. get-actor-version, update-actor-version, and a
copy in create-actor-version refuse a version not stored as files (Git repository, gist, or zip);
create-actor-version from files and delete-actor-version work whatever the Actor's versions are
stored as, but delete-actor-version takes expectedRevision only for a version stored as files.
- `api/` — the generic Apify API tools: search the operations of the published OpenAPI spec, get the
operations on a path, and send a GET, or a POST, PUT, PATCH, or DELETE, to a path. The write tool is in
no category (`UNCATEGORIZED_TOOLS`): `tools=api` serves the other three, and a session gets the write
Expand Down
4 changes: 3 additions & 1 deletion src/tools/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ import { publishActorTask } from './tasks/publish_actor_task.js';
import { unpublishActorTask } from './tasks/unpublish_actor_task.js';
import { updateActorTask } from './tasks/update_actor_task.js';
import { createActor } from './versions/create_actor.js';
import { createActorVersion } from './versions/create_actor_version.js';
import { deleteActorVersion } from './versions/delete_actor_version.js';
import { getActorVersion } from './versions/get_actor_version.js';
import { updateActorVersion } from './versions/update_actor_version.js';
import { callActorWidget } from './widgets/call_actor_widget.js';
Expand All @@ -80,7 +82,7 @@ export const toolCategories = {
tasks: [createActorTask, getActorTask, updateActorTask, publishActorTask, unpublishActorTask],
schedules: [createSchedule, getSchedule, updateSchedule, deleteSchedule],
builds: [getActorBuild, getActorBuildLog, getActorBuildList, buildActor],
versions: [getActorVersion, createActor, updateActorVersion],
versions: [getActorVersion, createActor, updateActorVersion, createActorVersion, deleteActorVersion],
api: [apifyApiSearch, apifyApiDetails, apifyApiRead],
dev: [reportProblem],
} satisfies Record<string, ToolEntry[]>;
Expand Down
38 changes: 37 additions & 1 deletion src/tools/structured_output_schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,10 @@ export const getActorVersionToolOutputSchema = {
actorId: { type: 'string', description: 'Actor ID' },
fullName: { type: 'string', description: 'Actor full name, username/name' },
versionNumber: { type: 'string', description: 'Version number, e.g. 0.1' },
buildTag: {
type: 'string',
description: 'Tag that new builds of this version get, e.g. latest; absent when the version has none',
},
revision: { type: 'string', description: 'Identifies the whole file set; changes when any file changes' },
files: {
type: 'array',
Expand Down Expand Up @@ -644,7 +648,7 @@ const sourceWriteBuildProperties = {
warnings: {
type: 'array',
items: { type: 'string' },
description: 'Things to know about the written files, such as empty files the build skips',
description: 'Things to know about the written version, such as empty files the build skips',
},
};

Expand All @@ -669,6 +673,38 @@ export const createActorToolOutputSchema = {
required: ['actorId', 'fullName', 'versionNumber', 'revision', 'files'],
};

/** Schema for create-actor-version: the new version and its files. */
export const createActorVersionToolOutputSchema = {
type: 'object' as const,
properties: {
actorId: { type: 'string', description: 'Actor ID' },
fullName: { type: 'string', description: 'Actor full name, username/name' },
versionNumber: { type: 'string', description: 'Number of the new version, e.g. 0.2' },
revision: createActorToolOutputSchema.properties.revision,
files: createActorToolOutputSchema.properties.files,
...sourceWriteBuildProperties,
},
required: ['actorId', 'fullName', 'versionNumber', 'revision', 'files'],
};

/** Schema for delete-actor-version: the version that was deleted. */
export const deleteActorVersionToolOutputSchema = {
type: 'object' as const,
properties: {
actorId: { type: 'string', description: 'Actor ID' },
fullName: { type: 'string', description: 'Actor full name, username/name' },
versionNumber: { type: 'string', description: 'Number of the deleted version' },
deleted: { type: 'boolean', description: 'Always true' },
tags: {
type: 'array',
items: { type: 'string' },
description:
'Tags that point to a build of the deleted version, empty when none; runs with such a tag still use that build',
},
},
required: ['actorId', 'fullName', 'versionNumber', 'deleted', 'tags'],
};

/** Schema for update-actor-version: the new revision and what changed. */
export const updateActorVersionToolOutputSchema = {
type: 'object' as const,
Expand Down
96 changes: 15 additions & 81 deletions src/tools/versions/create_actor.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
import type { ActorCollectionCreateOptions, ActorVersionSourceFile } from 'apify-client';
import { ActorSourceType, ApifyApiError } from 'apify-client';
import { ActorSourceType } from 'apify-client';
import dedent from 'dedent';
import { z } from 'zod';

import { APIFY_ERROR_TYPE_ACTOR_NAME_NOT_UNIQUE, HELPER_TOOLS } from '../../const.js';
import { UserInputError } from '../../errors.js';
import type { InternalToolArgs, ToolEntry, ToolInputSchema } from '../../types.js';
import { TOOL_TYPE } from '../../types.js';
import { compileSchema, fixZodSchemaRequired } from '../../utils/ajv.js';
import { respondAborted, respondUserError } from '../../utils/mcp.js';
import { respondAborted } from '../../utils/mcp.js';
import { createActorToolOutputSchema } from '../structured_output_schemas.js';
import { buildFilesManifest, buildFilesRevision } from './source_files.js';
import {
buildEmptyFilesWarnings,
buildSourceFileEntry,
buildSourceFileEntries,
extractSourceFiles,
redactSourceToolArgs,
resolveVersion,
respondAfterWrite,
respondToSourceToolError,
respondAfterCreate,
respondToCreateError,
sourceFileArgs,
validateFileContent,
validateFilePath,
validatePathCharacters,
} from './source_helpers.js';

const createActorArgs = z.object({
Expand All @@ -47,46 +41,6 @@ const createActorArgs = z.object({
.describe('Start a build of the version after creating the Actor, and return without waiting. Default: false.'),
});

/** The folders above a file, outermost first: `a` and `a/b` for `a/b/c.js`. */
function listFolders(path: string): string[] {
const segments = path.split('/');
return segments.slice(1).map((_, index) => segments.slice(0, index + 1).join('/'));
}

/**
* The entries to send, one per file; throws `UserInputError` for a path no file can be written at, and for a path
* given twice, since the platform puts the Actor name in the first .actor/actor.json and the build uses the last.
* Paths are checked through a set and a map, since comparing each file with every earlier one took 8 s for 20,000.
*/
function buildSourceFileEntries(files: readonly z.infer<typeof sourceFileArgs>[]): ActorVersionSourceFile[] {
const entries: ActorVersionSourceFile[] = [];
const filePaths = new Set<string>();
const firstFileByFolder = new Map<string, string>();
for (const [index, file] of files.entries()) {
validatePathCharacters(file.path, `files[${index}]`);
const entry = buildSourceFileEntry(file);
const label = `files[${index}] (${file.path})`;
validateFilePath(entry.name, label);
validateFileContent(entry, label);
if (filePaths.has(entry.name)) {
throw new UserInputError(`${label} repeats the path ${entry.name}; each path can be sent only once.`);
}
const folders = listFolders(entry.name);
const collision = folders.find((folder) => filePaths.has(folder)) ?? firstFileByFolder.get(entry.name);
if (collision !== undefined) {
throw new UserInputError(
`${label} collides with ${collision}; one path cannot be both a file and a folder.`,
);
}
filePaths.add(entry.name);
for (const folder of folders) {
if (!firstFileByFolder.has(folder)) firstFileByFolder.set(folder, entry.name);
}
entries.push(entry);
}
return entries;
}

/** The `version` of .actor/actor.json when it is a non-empty string in valid JSON, as `apify push` reads it. */
function readActorJsonVersion(entries: readonly ActorVersionSourceFile[]): string | undefined {
const actorJson = entries.find(({ name, format }) => name === '.actor/actor.json' && format === 'TEXT');
Expand Down Expand Up @@ -168,41 +122,21 @@ export const createActor: ToolEntry = Object.freeze({
// The platform sets the name in .actor/actor.json on create, so the stored files, not the sent ones, match
// a later read.
const version = resolveVersion(created, undefined, fullName);
const files = buildFilesManifest(
extractSourceFiles(version, `Version ${version.versionNumber} of ${fullName}`),
);
const emptyPaths = files.filter(({ sizeBytes }) => sizeBytes === 0).map(({ path }) => path);
return await respondAfterWrite({
return await respondAfterCreate({
toolArgs,
autoBuild: parsed.autoBuild,
target: { actorId: created.id, versionNumber: version.versionNumber },
structuredContent: {
actorId: created.id,
fullName,
versionNumber: version.versionNumber,
revision: buildFilesRevision(files),
files: files.map(({ path, sizeBytes, hash }) => ({ path, sizeBytes, hash })),
...buildEmptyFilesWarnings(emptyPaths),
},
created: { actorId: created.id, fullName, versionNumber: version.versionNumber },
sourceFiles: extractSourceFiles(version, `Version ${version.versionNumber} of ${fullName}`),
summary: `Created the private Actor ${fullName}.`,
});
} catch (error) {
if (
error instanceof ApifyApiError &&
error.type === APIFY_ERROR_TYPE_ACTOR_NAME_NOT_UNIQUE &&
error.attempt > 1
) {
const readTool = loadedToolNames.includes(HELPER_TOOLS.ACTOR_VERSION_GET)
? `; ${HELPER_TOOLS.ACTOR_VERSION_GET} reads its files`
: '';
return respondUserError(
`The platform refused the name ${parsed.name} as taken when the request was retried, so an earlier ` +
`attempt of this call may have created the Actor ${parsed.name}. ` +
`If it holds the files you sent, this call created it${readTool}.`,
{ httpStatus: error.statusCode },
);
}
return respondToSourceToolError(error);
return respondToCreateError(error, {
takenErrorType: APIFY_ERROR_TYPE_ACTOR_NAME_NOT_UNIQUE,
loadedToolNames,
refused: `the name ${parsed.name}`,
created: `the Actor ${parsed.name}`,
sentFiles: 'the files you sent',
});
}
},
} as const);
Loading
Loading