vxcontrol/pentagi · error
failed to get flow search log: %w
Error message
failed to get flow search log: %w
What it means
Wraps a failure from cnts.slc.GetFlowSearchLog(ctx, flowID) while building flowProviderWorkers; the search-log stream for the flow could not be retrieved. The original error is preserved via %w. Like the sibling log fetchers, any single failure aborts the entire flow log assembly.
Source
Thrown at backend/pkg/controller/flow.go:1230
func getFlowProviderWorkers(
ctx context.Context,
flowID int64,
cnts *flowProviderControllers,
) (*flowProviderWorkers, error) {
alw, err := cnts.alc.GetFlowAgentLog(ctx, flowID)
if err != nil {
return nil, fmt.Errorf("failed to get flow agent log: %w", err)
}
mlw, err := cnts.mlc.GetFlowMsgLog(ctx, flowID)
if err != nil {
return nil, fmt.Errorf("failed to get flow msg log: %w", err)
}
slw, err := cnts.slc.GetFlowSearchLog(ctx, flowID)
if err != nil {
return nil, fmt.Errorf("failed to get flow search log: %w", err)
}
tlw, err := cnts.tlc.GetFlowTermLog(ctx, flowID)
if err != nil {
return nil, fmt.Errorf("failed to get flow term log: %w", err)
}
vslw, err := cnts.vslc.GetFlowVectorStoreLog(ctx, flowID)
if err != nil {
return nil, fmt.Errorf("failed to get flow vector store log: %w", err)
}
tclw, err := cnts.tclc.GetFlowToolCallLog(ctx, flowID)
if err != nil {
return nil, fmt.Errorf("failed to get flow tool call log: %w", err)
}
sw, err := cnts.sc.GetFlowScreenshot(ctx, flowID)View on GitHub (pinned to ea665308ba)
Solutions
- Inspect the wrapped error for the storage-level cause (connection, timeout, not-found).
- Verify the flowID is valid in the current database.
- Run pending goose migrations so search-log tables exist.
- Retry on transient DB errors; check connection-pool settings.
Defensive patterns
Strategy: try-catch
Validate before calling
var exists bool
err := db.QueryRow("SELECT EXISTS(SELECT 1 FROM flows WHERE id=$1)", flowID).Scan(&exists)
if err != nil || !exists { /* abort with 404 */ } Type guard
func isSearchLogError(err error) bool {
return err != nil && strings.Contains(err.Error(), "failed to get flow search log")
} Try / catch
slw, err := cnts.slc.GetFlowSearchLog(ctx, flowID)
if err != nil {
if isTransient(err) { /* retry with backoff */ }
return nil, fmt.Errorf("failed to get flow search log: %w", err)
} Prevention
- Validate flowID against the flows table first.
- Run goose migrations on deploy so search-log tables exist.
- Alert on DB error rates in the controller layer.
- Retry transient DB errors with exponential backoff.
When it happens
Trigger: Flow detail/log retrieval call where the search-log component's storage query for flowID fails or returns an unexpected error.
Common situations: Search-log table missing from failed migrations; DB connection dropped mid-request; flowID referencing a nonexistent or purged flow.
Related errors
- failed to create flow search log: %w
- failed to get flow msg log: %w
- failed to get flow term log: %w
- failed to get flow vector store log: %w
- failed to get flow tool call log: %w
AI-assisted analysis of vxcontrol/pentagi@ea665308ba (2026-09-01).
Data as JSON: /api/errors/16255aba12ed9b16.
Report an issue: GitHub.