{"record":{"id":"3920652a8e7c8fa5","repo":"dagger/dagger","slug":"no-call-for-span","errorCode":null,"errorMessage":"no call for span","messagePattern":"no call for span","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"dagql/dagui/spans.go","lineNumber":157,"sourceCode":"\tsnapshot.Final = true // NOTE: applied to copy\n\tsnapshot.Progress = span.Progress.Clone()\n\treturn snapshot\n}\n\nfunc (span *Span) Call() *callpbv1.Call {\n\tif span.callCache != nil {\n\t\treturn span.callCache\n\t}\n\tif span.CallDigest == \"\" {\n\t\treturn nil\n\t}\n\tspan.callCache = span.db.Call(span.CallDigest)\n\treturn span.callCache\n}\n\nfunc (span *Span) CallID() (*call.ID, error) {\n\tif span.CallDigest == \"\" {\n\t\treturn nil, fmt.Errorf(\"no call for span\")\n\t}\n\treturn span.db.CallIDForDigest(span.CallDigest)\n}\n\nfunc (span *Span) Base() *callpbv1.Call {\n\tif span.baseCache != nil {\n\t\treturn span.baseCache\n\t}\n\n\tcall := span.Call()\n\tif call == nil {\n\t\treturn nil\n\t}\n\n\t// TODO: respect an already-set base value computed server-side, and client\n\t// subsequently requests necessary DAG\n\tif call.ReceiverDigest != \"\" {\n\t\tparentCall := span.db.Call(call.ReceiverDigest)","sourceCodeStart":139,"sourceCodeEnd":175,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/dagql/dagui/spans.go#L139-L175","documentation":"Span.CallID in dagql/dagui/spans.go returns the reconstructed call.ID for a span, but only if the span recorded a CallDigest. Spans that are not backed by a Dagger function call (UI spans, progress spans) have an empty CallDigest, so this error is returned. It is an expected condition for non-call spans, not data corruption.","triggerScenarios":"Calling span.CallID() on a span whose CallDigest is empty — e.g. iterating all spans in a trace view and asking each for its call ID.","commonSituations":"Walking the full span tree (internal, eval, progress spans) and assuming every span has a call; filtering for call spans after fetching instead of before.","solutions":["Check span.CallDigest != \"\" before calling CallID()","Skip non-call spans when building call-centric views","Use span.Call() and handle nil to distinguish call-backed spans","Log and continue rather than failing the whole view on non-call spans"],"exampleFix":"// before\nid, err := span.CallID()\n// after\nif span.CallDigest == \"\" {\n\tcontinue // non-call span\n}\nid, err := span.CallID()","handlingStrategy":"validation","validationCode":"if span.CallDigest == \"\" {\n\tcontinue // span is not backed by a function call\n}\nid, err := span.CallID()","typeGuard":"func isCallSpan(s *dagui.Span) bool {\n\treturn s != nil && s.CallDigest != \"\"\n}","tryCatchPattern":"id, err := span.CallID()\nif err != nil && strings.Contains(err.Error(), \"no call for span\") {\n\tcontinue // non-call span, expected\n}","preventionTips":["Filter to call-backed spans (non-empty CallDigest) before requesting IDs","Expect this error when iterating all spans; skip rather than fail","Use isCallSpan guards in view-building code"],"tags":["dagui","span","no-call"],"backgroundTag":"span-has-no-call-id","analyzedSha":"82ba2681dbe30d3547a1dc50ea495900ab5b6047","analyzedAt":"2026-09-05T07:21:37.930Z","contentChangedAt":"2026-09-05T07:21:37.930Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}