I recently started to use the Nais CLI. While trying to run nais kafka credentials -t <team> -e dev-gcp --ttl 1d, I encountered an error message:
creating Kafka credentials: input:3:2: createKafkaCredentials The server errored out while processing your request, and we didn't write a suitable error message. You might consider that a bug on our side. Please try again, and if the error persists, contact the Nais team.
The error was caused by the environment flag being set to dev-gcp instead of dev. Running nais kafka grant-access or nais kafka list, however, accepts an environment flag dev-gcp, not dev.
As an easy mistake to make (and detect?), I suggest adding error messages explaining the invalid environment flag in the following cases:
nais kafka credentials should use -e dev, not -e dev-gcp
nais kafka grant-access should use -e dev-gcp, not -e dev
nais kafka list should use -e dev-gcp, not -e dev
I recently started to use the Nais CLI. While trying to run
nais kafka credentials -t <team> -e dev-gcp --ttl 1d, I encountered an error message:The error was caused by the environment flag being set to
dev-gcpinstead ofdev. Runningnais kafka grant-accessornais kafka list, however, accepts an environment flagdev-gcp, notdev.As an easy mistake to make (and detect?), I suggest adding error messages explaining the invalid environment flag in the following cases:
nais kafka credentialsshould use-e dev, not-e dev-gcpnais kafka grant-accessshould use-e dev-gcp, not-e devnais kafka listshould use-e dev-gcp, not-e dev