Getting startedSet up the CLI
Exit codes and errors
Each ferry command stops with an exit code. An error goes to stderr with its cause.
The exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Failure: an API error, a failed or canceled deploy or job (with --follow), a refused confirmation |
2 | Usage error: an unknown command, an argument that is not there, a flag that is not valid |
130 | You stopped the command with Ctrl+C |
What an error looks like
ferry prints each error on stderr. The error code of the API is in parentheses.
error: service 'nope' not found (not_found)Two errors that you can see
Before a login, a command tells you how to log in:
error: not logged in: run 'ferry login --server <URL>' first (or set FERRY_SERVER and FERRY_TOKEN)If the server refuses the token, the error has a hint:
error: invalid API token (unauthorized)
hint: the token was refused (revoked or expired?): log in again with 'ferry login --server <URL>'