Skip to content

Bug: Add more details to validation errors  #1757

Closed
@AbhineetJain

Description

@AbhineetJain

OS Information

  • OS: Linux
  • Browser (if applicable):
  • Architecture: amd64
  • coder --version: Coder v0.0.0-devel+f2f3108

Steps to Reproduce

  1. coder templates init Select Docker.
  2. coder templates create
  3. coder create --template="docker" Add an invalid workspace name like -test1.

Expected

The error message should provide more information and be actionable.

Actual

status code 400: Validation failed  
        name: username  

username is a tag used for validating the workspace name.

Logs

Screenshot

Notes

We also see this error where we don't expect it. The hunch is that the value picked up from the prompt is not valid, although seems valid. Just outputting the actual value in the error message should help.

Metadata

Metadata

Assignees

Labels

apiArea: HTTP API

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions