Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Errors & exit codes

Exit codes

The boatramp CLI uses the two standard shell exit codes:

CodeMeaning
0Success.
1Any error.

On failure the CLI prints the error and its cause chain to stderr, then exits 1:

error: failed to publish site "blog"
  caused by: server returned 403 Forbidden
  caused by: token lacks required right site:blog · deploy

The top line is the command-level error; each caused by: is one link deeper in the underlying cause, so the root cause is the last line. Scripts should branch on the exit code (0 vs non-zero) rather than parse the message text.

(The one place a different code appears is the internal container/VMM sandbox worker, which propagates the guest’s exit status — not a surface a user invokes.)

API status codes

When the CLI talks to a server, an HTTP error is surfaced in the cause chain above. The control-plane API uses conventional statuses:

StatusMeaningCommon cause
400Bad requestMalformed body, or an invalid authz policy.
401UnauthenticatedMissing, malformed, expired, or revoked token.
403ForbiddenValid token without the required right.
404Not foundUnknown site, deployment, or alias.
409ConflictState precondition failed (e.g. activating a nonexistent deployment).
413Payload too largeUpload exceeds BOATRAMP_MAX_UPLOAD_BYTES.
429Too many requestsRate limit or upload-concurrency cap reached.
503UnavailableUpload slots exhausted, or the node is not ready.

A non-2xx response carries a JSON { "error": "..." } body, which becomes the deepest caused by: line.

Validation errors

boatramp validate (and sync, which validates first) reports config problems against project.cfg before anything is published — a bad route pattern, an unknown handler import, an unparsable cron schedule, or a credential-shaped value in a handler env. These fail at deploy time, not request time:

error: project.cfg: handler /api env var "TOKEN" looks like a secret; move it to
  [handlers].secrets as a reference to a host env var

See the routing schema for the fields these checks cover.