Skip to content
Docs menu

Errors

Every failure comes back as a structured object written for the agent that will fix it: cause first, then the fix. Never only a log dump.

The AgentError shape

AgentError fields
FieldTypeMeaning
status"failed" | "needs_input"failed: something broke. needs_input: a secret is missing; nothing broke.
stagestringWhere it happened: upload, detect, plan, provision, build, migrate, release, return, or auth, limits, env, domain, db, rollback.
servicestring?The service it happened in, e.g. api.
codestringStable machine code. Safe to branch on. Every code has an anchor on this page.
causestringWhat went wrong, in one sentence, naming the package, file, port or variable.
filestring?File and line when it can be extracted, e.g. payments.py:3.
fixstringWhat to do next, written as an instruction.
retryablebooleantrue when calling deploy again after the fix can succeed.
missingMissingSecret[]?For needs_input: each secret's name, service and the lines that read it.
upgradeUpgradeHint?When the fix is a plan upgrade: trigger, one-sentence message, plan and payment link.
logTailstring[]?The last relevant log lines (up to 30), only for errors the library does not know yet.
docsstring?Link to this page at the code's anchor, e.g. /docs/errors#missing_python_module.

Examples

A build or runtime failure, as the known-error library returns it:

deploy → failed
{
  "status": "failed",
  "stage": "release",
  "service": "api",
  "code": "missing_python_module",
  "cause": "Python module 'stripe' not found (imported in payments.py:3)",
  "file": "payments.py:3",
  "fix": "Add 'stripe' to requirements.txt (or pyproject.toml dependencies) of the 'api' service, then call deploy again",
  "retryable": true,
  "docs": "https://rivtor.com/docs/errors#missing_python_module"
}

A missing secret. Nothing is broken; the agent asks the user once:

deploy → needs_input
{
  "status": "needs_input",
  "stage": "plan",
  "code": "missing_secrets",
  "cause": "The app reads a secret that is not set: STRIPE_SECRET_KEY",
  "fix": "Ask the user for STRIPE_SECRET_KEY, call env_set with them, then call deploy again.",
  "retryable": true,
  "missing": [
    { "name": "STRIPE_SECRET_KEY", "service": "api",
      "usedIn": ["api/payments.py:3"] }
  ]
}

The self-healing loop

  1. The agent calls deploy.
  2. Rivtor returns failed with the stage, cause, file and fix, or needs_input with the missing secrets.
  3. The agent edits the code, or asks the user for the secret and calls env_set.
  4. The agent calls deploy again. Only services whose files changed rebuild, so each loop takes under a minute.

How a log becomes an error

Raw build and runtime output goes through the known-error library. Patterns registered for the failing stage are tried first, in library order, then every other pattern, then patterns chosen by exit code (137 out of memory, 139 segfault). The first match produces a cause and fix specific to your log: the package name, the file and line, the port, the variable. Secrets are redacted. Anything the library does not recognise comes back as unknown with logTail.

Build and runtime codes

All 71 codes in the library, plus unknown. The fix you receive is written for your exact log; the title here is the general case.

Databases, Redis and migrations

Databases, Redis and migrations
CodeWhat it meansStages
data_service_not_provisionedDatabase/Redis/S3 env var missingany
db_auth_failedDatabase authentication failedany
db_connection_refusedCannot connect to the databaseany
db_schema_missingTable does not exist (migrations not run)release
prisma_migration_failedPrisma migration failedmigrate, release
alembic_migration_failedAlembic migration failedmigrate, release
django_migration_failedDjango migration failedmigrate, release
migration_failedMigration command failedmigrate
celery_broker_unreachableCelery cannot reach its brokerrelease, migrate
redis_connection_refusedCannot connect to Redisany

Node.js, Next.js and bundlers

Node.js, Next.js and bundlers
CodeWhat it meansStages
lockfile_missingnpm ci without a lockfilebuild
lockfile_out_of_dateLockfile out of sync with package.jsonbuild
npm_peer_conflictnpm peer dependency conflictbuild
npm_package_not_foundnpm package or version does not existbuild
node_version_mismatchNode.js version not supportedbuild, release, migrate
native_module_build_failedNative npm module failed to compilebuild
next_missing_suspenseuseSearchParams() not wrapped in Suspensebuild
next_dynamic_server_usagePage uses dynamic APIs during static generationbuild
next_static_export_unsupportedFeature not supported with output: 'export'build
next_prerender_errorNext.js failed to pre-render a pagebuild
eslint_build_failureESLint errors fail the buildbuild
vite_unresolved_importBundler could not resolve an importbuild
typescript_errorTypeScript type errorbuild
node_esm_cjs_mismatchES module / CommonJS mismatchbuild, release, migrate
prisma_client_not_generatedPrisma client not generatedbuild, release, migrate
node_entry_not_foundStart file does not existrelease, migrate
node_local_import_not_foundRelative import points to a missing filebuild, release, migrate
missing_node_moduleNode package not installedbuild, release, migrate
missing_build_scriptNo build scriptbuild
missing_start_scriptNo start scriptbuild, release, migrate
static_output_missingStatic build output folder not foundbuild

Python and Django

Python and Django
CodeWhat it meansStages
missing_requirements_filerequirements file not foundbuild
python_version_incompatiblePython version not supportedbuild
pip_resolution_conflictPython dependency conflictbuild
python_package_not_foundPython package or version does not existbuild
python_wheel_build_failedPython package failed to build from sourcebuild
python_syntax_errorPython syntax errorbuild, release, migrate
asgi_app_not_founduvicorn/gunicorn could not load the apprelease, migrate
missing_python_modulePython module not installedbuild, release, migrate
python_import_errorPython ImportError (name not found)build, release, migrate
django_disallowed_hostDjango rejects the host headerrelease, migrate
django_csrf_originDjango CSRF origin check failedrelease, migrate
django_improperly_configuredDjango settings errorbuild, release, migrate

Go and Rust

Go and Rust
CodeWhat it meansStages
go_version_mismatchGo toolchain too oldbuild
go_module_missingGo module missing from go.mod / go.sumbuild
go_compile_errorGo compile errorbuild
rust_toolchain_too_oldRust toolchain too old for a dependencybuild
rust_compile_errorRust compile errorbuild

Dockerfile and builders

Dockerfile and builders
CodeWhat it meansStages
dockerfile_copy_failedDockerfile COPY/ADD source not foundbuild
dockerfile_syntax_errorDockerfile parse errorbuild
docker_base_image_not_foundBase image not foundbuild
railpack_no_start_commandBuilder could not find a start commandbuild
railpack_unsupportedBuilder could not detect the languagebuild

Runtime, ports and platform

Runtime, ports and platform
CodeWhat it meansStages
out_of_memoryProcess ran out of memory (also exit code 137)build, release, migrate
build_timeoutBuild exceeded the time limitbuild
file_watcher_limitDev server / watch mode running in productionbuild, release, migrate
disk_fullNo disk space leftany
segfaultProcess crashed with a segmentation fault (also exit code 139)build, release, migrate
port_in_usePort already in usebuild, release, migrate
dev_server_in_productionDev server used as the start commandrelease, migrate
wrong_portApp listens on a different port than expectedrelease, migrate
bound_to_localhostApp listens on 127.0.0.1 instead of 0.0.0.0release, migrate
health_check_timeoutApp never answered the health checkrelease, migrate
crlf_line_endingsScript has Windows (CRLF) line endingsbuild, release, migrate
exec_format_errorBinary built for the wrong platformbuild, release, migrate
permission_deniedPermission deniedbuild, release, migrate
command_not_foundCommand not foundbuild, release, migrate
missing_env_at_buildEnvironment variable missing at build timebuild
missing_env_varEnvironment variable missing at runtimerelease, migrate, provision, plan, detect, upload, return
missing_system_libraryMissing system shared librarybuild, release, migrate
registry_network_errorTransient network error while downloading dependenciesbuild
unknownNot in the library yet. The cause quotes the most useful error line, logTail carries the last 30 relevant lines, and the fix says where to look for this stage.any

Platform codes

Returned by the API, the MCP servers and the CLI themselves rather than read from a log. Plan limits use HTTP 402 and include an upgrade hint with a payment link.

Platform error codes
CodeWhenFix
unauthorizedNo token, or the token is invalid, expired or revoked.Run rivtor login or create a new token at /dashboard/tokens.
token_expiredThe API token has expired.Create a new token and update RIVTOR_TOKEN or your MCP config.
not_logged_inCLI or local MCP server has no token.Run rivtor login, or set RIVTOR_TOKEN.
forbiddenYour role on a shared project does not allow this action.Ask the project owner.
too_many_auth_failuresToo many failed sign-ins from one address.Wait, then retry with a valid token.
rate_limitedToo many requests in a short window.Wait a moment and retry.
project_limitHTTP 402. The plan's project limit is reached.Delete a project or follow the upgrade link in the error.
service_limitHTTP 402. The app has more services than the plan allows per project.Merge services, or upgrade.
domain_limitHTTP 402. The plan's custom-domain limit is reached.Remove a domain, or upgrade.
teammates_not_includedHTTP 402. Inviting teammates needs Pro or Team.Upgrade to invite teammates.
always_on_not_includedHTTP 402. Free apps sleep after an hour idle.Upgrade to Hobby or above for always-on.
verification_requiredAlways-on or a custom domain needs phone or card verification first.Verify your account in the dashboard.
missing_secretsstatus needs_input: the code reads secrets that are not set.Ask the user once, call env_set, deploy again.
nothing_to_deployNo deployable app was found in the uploaded files.Deploy the folder that contains the app's manifest, or add a deploy.toml.
source_too_largeInline files total more than 2 MB (remote deploy).Use the local server or the CLI, which upload a tarball (300 MB limit).
missing_sourceA deploy request had no source.Pass path (local), or git_url, starter or files (remote).
invalid_git_urlgit_url is not a valid public https URL.Use a URL like https://github.com/user/repo.
project_name_takenThe project slug belongs to another account.Pick another slug with --project or rivtor.json.
project_suspendedThe project is suspended pending abuse review.Write to abuse@rivtor.com.
provision_failedCreating Postgres, Redis or storage failed.Retry the deploy; if it repeats, contact support.
wait_timeoutThe deployment is still running after the wait limit.Follow it with status or logs using the deploymentId.
env_read_onlyTried to change a credential Rivtor manages (DATABASE_URL, REDIS_URL, S3_*).Leave it; Rivtor injects and rotates it.
invalid_env_keyAn env var name is not valid.Use letters, digits and underscores, not starting with a digit.
domain_takenThe domain is already attached to another project.Remove it there first.
reserved_hostnameThe hostname is a rivtor.com app address.Those are assigned automatically; attach your own domain.
platform_hostnameThe hostname belongs to Rivtor.Attach a domain you own.
nothing_to_roll_backThere is no earlier release.Deploy again instead.
release_expiredThat release's files were garbage-collected.Roll back to a newer release, or redeploy.
no_databaseThe project has no Postgres database yet.Deploy code that uses Postgres, or set data = ["postgres"] in deploy.toml.
sql_too_longA db query is longer than 20,000 characters.Shorten the query.
network_errorThe CLI could not reach the API.Check your connection and RIVTOR_API_URL.

Plan limits behind the 402 codes are on Limits.