Return codes - NICE DCV Session Manager
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Return codes

The return code is usually but not always a hidden code sent after running a DCV SM Command Line Interface (DCV SM CLI) command, which describes the status of the command. You can use the echo command to display the code sent from the last DCV SM CLI command and use these codes to determine if a command was successful or if it failed, and why a command may have an error. In addition to the return codes, you can view more details about a failure by running your commands with the --debug switch. This switch produces a detailed report of the steps the DCV SM CLI uses to process the command, and what the result of each step was. To determine the return code of a DCV SM CLI command, run one of the following commands immediately after running the CLI command.

  • Linux and macOS

    $ echo $? 0
  • Windows PowerShell

    $ echo $lastexitcode 0
  • Windows command prompt

    $ echo %errorlevel% 0

The following return codes appear at the end of execution of a CLI command:

  • 0 The command was successful. There were no errors thrown by either the CLI or by the service that the request was made to.

  • 1 The configuration file parsed to the CLI was not found or might be corrupt.

  • 2 The command entered on the command line failed to be parsed. Parsing failures can be caused by, but are not limited to, missing any required subcommands or arguments or using any unknown commands or arguments. Note that this return code meaning is applicable to all CLI commands.

  • 130 The process received a SIGINT (Ctrl-C).

  • 252 Command syntax was invalid, an unknown parameter was provided, or a parameter value was incorrect and prevented the command from running.

  • 253 The system environment or configuration was invalid. While the command provided may be syntactically valid, missing configuration or credentials prevented the command from running.

  • 254 The command was successfully parsed and a request was made to the specified service but the service returned an error. This will generally indicate incorrect API usage or other service specific issues.

  • 255 General catch-all error. The command may have parsed correctly but an unspecified runtime error occurred when running the command. Because this is a general error code, an error may change from 255 to a more specific return code. A return code of 255 shouldn't be relied on to determine a specific error case.