vxcontrol/pentagi · error
failed to get flow screenshot: %w
Error message
failed to get flow screenshot: %w
What it means
Wraps a failure from cnts.sc.GetFlowScreenshot(ctx, flowID) — the screenshot worker could not be created while assembling flowProviderWorkers. Cause preserved via %w; this is the final fetch step before the bundle is returned.
Source
Thrown at backend/pkg/controller/flow.go:1250
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)
if err != nil {
return nil, fmt.Errorf("failed to get flow screenshot: %w", err)
}
return &flowProviderWorkers{
mlw: mlw,
alw: alw,
slw: slw,
tlw: tlw,
vslw: vslw,
tclw: tclw,
sw: sw,
}, nil
}
View on GitHub (pinned to ea665308ba)
Solutions
- Check the wrapped cause to identify whether it is storage (DB/blob) related.
- Verify the flowID exists and screenshots were persisted for it.
- Check screenshot storage configuration/env vars and connectivity.
- Retry on transient storage errors.
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 isScreenshotError(err error) bool {
return err != nil && strings.Contains(err.Error(), "failed to get flow screenshot")
} Try / catch
sw, err := cnts.sc.GetFlowScreenshot(ctx, flowID)
if err != nil {
if isTransient(err) { /* retry */ }
return nil, fmt.Errorf("failed to get flow screenshot: %w", err)
} Prevention
- Verify screenshot storage config/env vars at startup.
- Confirm screenshots are persisted before exposing the flow detail endpoint.
- Check storage backend connectivity in health checks.
- Retry transient storage failures with backoff.
When it happens
Trigger: Flow log retrieval where the screenshot storage lookup for flowID fails or the screenshot container/backend errors.
Common situations: Screenshot storage (DB/blob store) unavailable; flow deleted before screenshots were persisted; storage misconfiguration in environment.
Related errors
- failed to create flow screenshot: %w
- failed to get flow msg log: %w
- failed to get flow search log: %w
- failed to get flow term log: %w
- failed to get flow vector store log: %w
AI-assisted analysis of vxcontrol/pentagi@ea665308ba (2026-09-01).
Data as JSON: /api/errors/ed747173c330910a.
Report an issue: GitHub.