Skip to content

Commit a6d5bce

Browse files
chore: add more fields to log
1 parent ebd5ed7 commit a6d5bce

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

agent/agentcontainers/subagent.go

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,6 @@ func (a *subAgentAPIClient) Create(ctx context.Context, agent SubAgent) (SubAgen
233233
if err != nil {
234234
return SubAgent{}, err
235235
}
236-
for _, appError := range resp.AppCreationErrors {
237-
app := apps[appError.Index]
238-
239-
a.logger.Warn(ctx, "unable to create app",
240-
slog.F("app_slug", app.Slug),
241-
slog.F("field", appError.GetField()),
242-
slog.F("error", appError.GetError()),
243-
)
244-
}
245236

246237
agent.Name = resp.Agent.Name
247238
agent.ID, err = uuid.FromBytes(resp.Agent.Id)
@@ -252,6 +243,20 @@ func (a *subAgentAPIClient) Create(ctx context.Context, agent SubAgent) (SubAgen
252243
if err != nil {
253244
return agent, err
254245
}
246+
247+
for _, appError := range resp.AppCreationErrors {
248+
app := apps[appError.Index]
249+
250+
a.logger.Warn(ctx, "unable to create app",
251+
slog.F("agent_name", agent.Name),
252+
slog.F("agent_id", agent.ID),
253+
slog.F("directory", agent.Directory),
254+
slog.F("app_slug", app.Slug),
255+
slog.F("field", appError.GetField()),
256+
slog.F("error", appError.GetError()),
257+
)
258+
}
259+
255260
return agent, nil
256261
}
257262

0 commit comments

Comments
 (0)