Skip to content

An overly technical and unfriendly error is presented when a template has two presets with the same name #19270

@SasSwart

Description

@SasSwart

When a user uploads a template version that has two presets with a common name
Then the following unfriendly error message is presented:

=== ✘ Cleaning Up [16ms]
Encountered an error running "coder templates push", see "coder templates push --help" for more information
error: internal provisionerserver error: execute transaction: insert workspace presets and parameters: insert workspace preset: insert preset and parameters: execute transaction: insert preset: pq: duplicate key value violates unique constraint "idx_unique_preset_name"

We should catch this error and preset a more friendly error that communicates the validation error clearly.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions