fix(coderd): fix template ai task check error message (#20651)

Create task was still mentioning magic prompt parameter when checking
template task validity. This change updates it to only mention validity
of `coder_ai_task` resource.
This commit is contained in:
Mathias Fredriksson
2025-11-03 12:54:43 +00:00
committed by GitHub
parent afd7fc8687
commit daad93967a
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -92,7 +92,7 @@ func (api *API) tasksCreate(rw http.ResponseWriter, r *http.Request) {
if !templateVersion.HasAITask.Valid || !templateVersion.HasAITask.Bool {
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
Message: fmt.Sprintf(`Template does not have required parameter %q`, codersdk.AITaskPromptParameterName),
Message: `Template does not have a valid "coder_ai_task" resource.`,
})
return
}