From 2f668b77a2f92bbee41cfad96afe8fe26437d0a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Samin?= Date: Tue, 25 Apr 2023 14:57:00 +0200 Subject: [PATCH] fix(api): workflow template check params typos (#6541) --- sdk/workflow_template.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/workflow_template.go b/sdk/workflow_template.go index 513d931cc5..94088a4c88 100644 --- a/sdk/workflow_template.go +++ b/sdk/workflow_template.go @@ -148,18 +148,18 @@ func (w *WorkflowTemplate) CheckParams(r WorkflowTemplateRequest) error { switch p.Type { case ParameterTypeBoolean: if v != "" && !(v == "true" || v == "false") { - return NewErrorFrom(ErrInvalidData, "Given value it's not a boolean for %s", p.Key) + return NewErrorFrom(ErrInvalidData, "%q value should be a boolean", p.Key) } case ParameterTypeRepository: sp := strings.Split(v, "/") if len(sp) != 3 { - return NewErrorFrom(ErrInvalidData, "Given value don't match vcs/repository pattern for %s", p.Key) + return NewErrorFrom(ErrInvalidData, "%q value should match vcs/repository pattern", p.Key) } case ParameterTypeJSON: if v != "" { var res interface{} if err := JSONUnmarshal([]byte(v), &res); err != nil { - return NewErrorFrom(ErrInvalidData, "Given value it's not json for %s", p.Key) + return NewErrorFrom(ErrInvalidData, "%q value should be json", p.Key) } } }