Skip to content

Commit 5f34a72

Browse files
authored
fix: remove internal reference to override for users to proceed (#59)
See note in: https://runware.atlassian.net/browse/RUN-10682
1 parent c234ae5 commit 5f34a72

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

internal/api/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func (c *Client) Run(ctx context.Context, model string, args []string, opts RunO
151151
ms, err := fetchModelSchema(ctx, model, schemaClient, baseURL)
152152
if err != nil {
153153
if opts.TaskType == "" {
154-
return nil, fmt.Errorf("could not fetch schema for %q: %w; set RunOptions.TaskType to skip validation", model, err)
154+
return nil, fmt.Errorf("could not fetch schema for %q: %w; set --task-type to skip validation", model, err)
155155
}
156156
c.logger.Warn("schema unavailable; skipping validation", "model", model, "err", err)
157157
} else {
@@ -171,7 +171,7 @@ func (c *Client) Run(ctx context.Context, model string, args []string, opts RunO
171171
if taskType == "" {
172172
detected, ok := schema.ExtractTaskType(reqSchema)
173173
if !ok {
174-
return nil, fmt.Errorf("could not detect task type for model %q; set RunOptions.TaskType", model)
174+
return nil, fmt.Errorf("could not detect task type for model %q; set --task-type", model)
175175
}
176176
taskType = detected
177177
}

internal/api/run_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func TestClientRun_SchemaUnavailable_TaskTypeProvided(t *testing.T) {
148148
}
149149

150150
// TestClientRun_SchemaUnavailable_NoTaskType: schema endpoint returns 404 and no
151-
// TaskType is provided; Run must return a descriptive error.
151+
// task type is provided; Run must return a descriptive error.
152152
func TestClientRun_SchemaUnavailable_NoTaskType(t *testing.T) {
153153
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
154154
w.WriteHeader(http.StatusNotFound)
@@ -162,8 +162,8 @@ func TestClientRun_SchemaUnavailable_NoTaskType(t *testing.T) {
162162
if err == nil {
163163
t.Fatal("expected error when schema unavailable and no TaskType, got nil")
164164
}
165-
if !strings.Contains(err.Error(), "RunOptions.TaskType") {
166-
t.Errorf("expected error to mention RunOptions.TaskType, got: %v", err)
165+
if !strings.Contains(err.Error(), "--task-type") {
166+
t.Errorf("expected error to mention --task-type, got: %v", err)
167167
}
168168
}
169169

0 commit comments

Comments
 (0)