Skip to content

Commit 7c7bf79

Browse files
committed
tidy comments.
ensure string for uuid.
1 parent fab2c5e commit 7c7bf79

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

internal/api/client.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,10 @@ func (c *Client) Run(ctx context.Context, model string, args []string, opts RunO
226226
// Inject system fields. Use a caller-supplied taskUUID if provided, otherwise generate.
227227
var taskUUID uuid.UUID
228228
if raw, ok := payload[fieldTaskUUID]; ok {
229-
s, _ := raw.(string)
229+
s, ok := raw.(string)
230+
if !ok {
231+
return nil, fmt.Errorf("taskUUID: expected string UUID, got %T", raw)
232+
}
230233
parsed, err := uuid.Parse(s)
231234
if err != nil {
232235
return nil, fmt.Errorf("taskUUID: invalid UUID %q: %w", s, err)

0 commit comments

Comments
 (0)