Skip to content

Commit

Permalink
Add logs to generate func
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaMahany committed Jul 18, 2024
1 parent e4ac29a commit 5bce7bd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ee/katc/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ func (k *katcTable) generate(ctx context.Context, queryContext table.QueryContex
// Fetch data from our table source
dataRaw, err := k.sourceType.dataFunc(ctx, k.slogger, k.sourcePaths, k.sourceQuery, queryContext)
if err != nil {
k.slogger.Log(ctx, slog.LevelWarn,
"running data func",
"err", err,
)
return nil, fmt.Errorf("fetching data: %w", err)
}

Expand All @@ -127,6 +131,11 @@ func (k *katcTable) generate(ctx context.Context, queryContext table.QueryContex
for _, step := range k.rowTransformSteps {
dataRawRow, err = step.transformFunc(ctx, k.slogger, dataRawRow)
if err != nil {
k.slogger.Log(ctx, slog.LevelWarn,
"running transform func",
"transform_step", step.name,
"err", err,
)
return nil, fmt.Errorf("running transform func %s: %w", step.name, err)
}
}
Expand Down

0 comments on commit 5bce7bd

Please sign in to comment.