beginner-corp/cli

Need better error message when using invalid character when creating an environment variable name

macdonst opened this issue · 0 comments

When you run the command:

begin env create -e staging -n 1API_KEY -v fake-key

You get the response:

Error: Failed to create environment variable

Which tells you that the creation has failed but not why the creation has failed.

Expected behaviour

I would expect the CLI to tell me the root cause of the failure to create.

Error: Failed to create environment variable
Environment variable names can consist of up to 64 characters. The name can contain upper- and lowercase letters, numbers, and underscores (_), but it must start with a letter or underscore.

Steps to reproduce

Run the command:

begin env create -e staging -n 1API_KEY -v fake-key

Platform version

  • MacOS 14.2.1
  • Begin version: main-21f0079
  • Node.js v18.15.0