drift Docs
Start
What is Drift?
The tour, if you are new here.
Use cases
Whether Drift does your thing.
Getting started
Nothing to deployed, in one command.
Architecture
How a slice is put together.
What it costs
The free grant, four unit prices, two rules.
Build
Canvas
Static sites, same origin as your API.
Tools
Operate
Auth
Accounts, tokens and scopes.
Security
Boundaries, sandboxing and hardening.
Troubleshooting
Error codes
What went wrong, and what to do about it.
Legal
Acceptable use
What a slice may not be used for.
Data processing
The DPA, and every sub-processor.

Error codes

Every message the CLI prints starts with what it was trying to do — Couldn't create slice: …, Couldn't deploy atomic function: … — and ends with the reason. This page is the reasons: what produces each one, and what to do about it.

The CLI does not invent an error surface. It renders the status the platform returned plus whatever the platform said about it, so if you see a sentence that is not here, it came from the platform verbatim and means what it says.

Before the request lands

These happen on your machine or on the wire. No slice was touched.

What it meansWhat to do
  • couldn't reach the Drift API (timed out)
    What it means
    The request left and nothing came back inside the timeout.
    What to do
    Check your own connection first. If that is fine, the platform is likely mid-restart — try again in a minute.
  • couldn't reach the Drift API. Is the platform up?
    What it means
    DNS did not resolve, or the connection was refused outright.
    What to do
    Nothing reached Drift at all. A proxy or a firewall between you and api.ondrift.eu is the usual cause.
  • Drift is temporarily unavailable — most likely brief maintenance. Your login is still valid; nothing to do but try again in a few minutes.
    What it means
    The platform answered with a 502, 503 or 504. It is up but not serving.
    What to do
    Wait. Do not log out. Re-authenticating needs the same platform, so logging out here turns a short wait into a lockout.
  • this machine has no copy of the Driftfile format yet, so it cannot be validated
    What it means
    drift file lint has never fetched the schema, so it has nothing to validate against.
    What to do
    Run any online command once — drift account login, drift slice list — and it caches permanently at ~/.drift/driftfile.schema.json.

"Unavailable" never names a component.

A database, a rolling restart and a chart apply are the same event from outside, and which one it was is Drift's problem rather than yours. The message says to wait because waiting is the whole of the correct response.

Your account and session

What you seeWhat it meansWhat to do
  • 401
    What you see
    your session expired. Run 'drift account login' to re-authenticate.
    What it means
    Your token is no longer valid.
    What to do
    drift account login.
  • 401
    What you see
    invalid username or password.
    What it means
    Only on drift account login itself.
    What to do
    Check the credentials. There is no rate-limit lockout to wait out.
  • 403
    What you see
    you don't have permission to do that.
    What it means
    You are authenticated, and this is not yours.
    What to do
    Usually a slice belonging to another account. drift slice list shows what you can reach.

Deploying a project

Most of these are found offline, before anything is built or uploaded. drift file lint reaches all of them without an account.

What it meansWhat to do
  • at '/atomic/functions/0': missing property 'handler'
    What it means
    An entry names no callable. name, handler and memory are all required.
    What to do
    Add handler:. See Write a function.
  • the Driftfile declares a function served by "X", and no such callable is in <dir>
    What it means
    The handler is not in the element's folder. The error lists the callables that are there.
    What to do
    Usually a spelling or case difference — the message says so explicitly when the only difference is case.
  • "X" is declared in N files in <dir>
    What it means
    Two files in one element declare the same handler. The generated entry point imports by name and cannot pick.
    What to do
    Rename one, or split them into separate elements.
  • route collision — these functions share an identity
    What it means
    Two entries have the same name. The /api space is shared across every element, so this collides wherever they live.
    What to do
    Method is part of the identity, so get:x beside post:x is fine; two post:x is not.
  • <dir> mixes languages (go in a.go, python in b.py)
    What it means
    An element has one dependency manifest and one runtime, so it cannot be two languages.
    What to do
    Move one language into its own folder under atomic/ and give those functions an element:.
  • no source files in <dir>
    What it means
    The manifest declares functions in a directory that holds no code.
    What to do
    Check dir:/element: against where the handlers actually live.
  • function limit reached (N/M) (429)
    What it means
    The slice is contracted for M functions and already runs N.
    What to do
    drift slice resize to buy another slot, or remove a function you no longer need.
  • you're at your plan limit. Run 'drift slice resize' to add capacity. (402/429)
    What it means
    Some declared resource exceeds what the slice booked.
    What to do
    The message names the resource when the platform supplied one.
  • atomic.functions[0]: function "X" declares dir <path>, which is not a directory
    What it means
    A dir: points somewhere that is not on this machine.
    What to do
    A schema cannot check paths; only your laptop can. Fix the path or drop the key and let the element own it.

drift file apply will not create a slice for you.

Applied against a slice that does not exist, it stops and names drift slice create instead of provisioning something you never priced. Make the slice first with drift slice create <name>. Apply never changes a slice's shape in either direction either — growing and shrinking both happen in the form, via drift slice resize.

While your function runs

These reach the caller, not your terminal. Read them with drift atomic logs.

What it meansWhat to do
  • 404
    What it means
    No function is registered at that method and path.
    What to do
    A function is identified by method and path, so POST /api/items does not fall through to the get:items handler. Check the name in your Driftfile.
  • 401
    What it means
    The function's gate is auth: apikey and the request carried no valid key.
    What to do
    See Authentication. Setting a key on a route forces apikey whatever the entry says.
  • 403 unknown auth type
    What it means
    The gate is a value the slice does not understand.
    What to do
    Only none and apikey exist. drift file lint refuses anything else offline — this can only appear on a function deployed before that check existed.
  • 429
    What it means
    Two unrelated things answer 429, and they are worth telling apart.
    What to do
    Either the slice-wide rate_limit shed the request, or the function's memory pool had no room to admit another invocation. The first is a quota you set; the second means concurrent calls together exceeded what that function booked.
  • 500
    What it means
    Your handler returned an error, panicked, or exceeded function_timeout.
    What to do
    Each invocation is its own process, so a panic returns 500 and the next request is served by a fresh one. Nothing else in the slice is disturbed.
  • 502
    What it means
    The function was reached but produced no usable response — commonly a handler returning the wrong shape.
    What to do
    Return (status, message, payload); Go adds a fourth headers value. See Write a function.

Secrets that are not there

A function receives only the secrets its own entry names. If drift.Backbone.Secret.Get("X") comes back empty or errors:

  1. Check secrets: on that function's Driftfile entry. A secret the slice holds is still unreachable from a function that did not name it.
  2. Check the value exists — drift backbone secret list.
  3. Read it through the SDK, not the environment. DRIFT_SECRET_X exists only on the per-invocation subprocess path; Python and Node functions served by the persistent language server get theirs in the request envelope and no environment variable is set.

Adding a name to secrets: needs a redeploy. Changing a value does not — the runner fetches on every call.

When none of this fits

drift file lint and drift file simulate answer most questions without deploying anything, and neither needs the platform to be healthy. If a message is not on this page, it came from the platform unchanged — quote it verbatim when reporting, because the wording identifies which check produced it.