Skip to main content
The Nebius AI Cloud CLI can make multiple network requests when running a command to improve the user experience. The CLI divides the requests into target and extra calls:
  • A target call is the main network request for a command and corresponds to the command path. For example, for nebius compute instance create, the target gRPC call is nebius.compute.v1.InstanceService/Create.
  • Extra calls improve the user experience and return a clearer picture of resource state. They include waiting for an operation that a target request started to complete, and fetching a resource after the CLI has created or updated it. The exit code for an extra-call error equals the exit code for the target call plus 40.

Exit code reference

The CLI groups exit codes as follows:
  • General CLI errors: 1–10
  • Target call gRPC errors: 11–20
  • Target call service errors: 21–50
  • Extra call gRPC errors: 51–60
  • Extra call service errors: 61–90
Exit codeDescription
1Unknown error. Server returned UNKNOWN gRPC code.
2Incorrect input from the user. Unknown flag or command, unparsable JSON or YAML input, unparsable flag value, incorrect number of arguments for the command.
3Validation error. Wrong command argument or flag value, or server returned INVALID_ARGUMENT gRPC code for a target or extra call.
4CLI configuration error.
5CLI internal error. Server returned UNIMPLEMENTED, INTERNAL or DATA_LOSS gRPC code.
6The user canceled command execution.
7Any authentication error. For example, SDK couldn’t set the Bearer token, or server returned UNAUTHENTICATED gRPC code for a request.
11, 51Service returned gRPC code CANCELLED for a target or extra call.
12, 52gRPC code DEADLINE_EXCEEDED.
13, 53gRPC code NOT_FOUND.
14, 54gRPC code ALREADY_EXISTS.
15, 55gRPC code PERMISSION_DENIED.
16, 56gRPC code RESOURCE_EXHAUSTED.
17, 57gRPC code FAILED_PRECONDITION.
18, 58gRPC code ABORTED.
19, 59gRPC code OUT_OF_RANGE.
20, 60gRPC code UNAVAILABLE.
21, 61Service error BadResourceState.
22, 62Service error ResourceConflict.
23, 63Service error TooManyRequests.
24, 64Service error QuotaFailure.
25, 65Service error NotEnoughResources.

How the CLI determines exit codes

The CLI determines the exit code for a gRPC request error as follows:
  • If the server returns a gRPC code other than OK, the CLI checks the first element in google.rpc.Status.details.
  • If that element is a ServiceError with a designated exit code, the CLI returns that code.
  • If the service error has no designated exit code, or the details do not contain a service error, the CLI returns the exit code that corresponds to the gRPC code.