Skip to content

Commit c81a120

Browse files
committed
Return err when no params supplied
1 parent 322b15e commit c81a120

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

builder/builder.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ func (br BuildRouter) Build(typeName, path string, params interface{}) (tasks.Co
4040
return nil, fmt.Errorf("no builders registered for task type '%s'", typeName)
4141
}
4242

43+
if params == nil {
44+
return nil, fmt.Errorf("no params supplied for task type '%s'", typeName)
45+
}
46+
4347
return builder.Build(typeName, path, params)
4448
}
4549

0 commit comments

Comments
 (0)