Closed
Description
OS Information
- OS: Windows 10
coder --version
:
Coder v0.5.10+ba818b3 Wed May 18 00:07:20 UTC 2022
ba818b3
Steps to Reproduce
- Init any template
- Run "coder template create wrong-name_ -d "[path to template]"
- Set service account key
- Confirm create? (yes/no) yes
Expected
Any error message that template name has a wrong format is displayed
Actual
status code 400: Validation failed
name: username
The same for a new worskpace created with CLI.
What is your suggestion?
Currently if Workspace Name or Template Name does not match names rules: "Name must start with a-Z or 0-9 and can contain a-Z, 0-9 or -."
in CLI the resulting error is:
status code 400: Validation failed
name: username
That is confusing since this is not username that causes the error, but template name or workspace name in case workspace was created.
Logs
Screenshot
Template error
Workspace error