{"record":{"id":"803be9ad001601a8","repo":"dagger/dagger","slug":"failed-to-decode-source-map-w","errorCode":null,"errorMessage":"failed to decode source map: %w","messagePattern":"failed to decode source map: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/schema/module.go","lineNumber":1742,"sourceCode":"\t}\n\treturnType, err := args.ReturnType.Load(ctx, dag)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to decode return type: %w\", err)\n\t}\n\treturn fn.WithReturnType(returnType), nil\n}\n\nfunc (s *moduleSchema) functionWithSourceMap(ctx context.Context, fn *core.Function, args struct {\n\tSourceMap core.SourceMapID\n}) (*core.Function, error) {\n\tdag, err := core.CurrentDagqlServer(ctx)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get dag server: %w\", err)\n\t}\n\n\tsourceMap, err := args.SourceMap.Load(ctx, dag)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to decode source map: %w\", err)\n\t}\n\treturn fn.WithSourceMap(sourceMap), nil\n}\n\nfunc (s *moduleSchema) functionWithSourceMapResult(ctx context.Context, fn *core.Function, args struct {\n\tSourceMap dagql.Optional[core.SourceMapID]\n}) (*core.Function, error) {\n\tsourceMap, err := s.loadSourceMapResult(ctx, args.SourceMap)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn fn.WithSourceMap(sourceMap), nil\n}\n\nfunc (s *moduleSchema) functionArgWithTypeDef(ctx context.Context, arg *core.FunctionArg, args struct {\n\tTypeDef core.TypeDefID\n}) (*core.FunctionArg, error) {\n\tdag, err := core.CurrentDagqlServer(ctx)","sourceCodeStart":1724,"sourceCodeEnd":1760,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/core/schema/module.go#L1724-L1760","documentation":"Wrapped error in functionWithSourceMap: args.SourceMap.Load(ctx, dag) failed — the SourceMapID given to withSourceMap could not be decoded into a SourceMap object, so the function's doc source location cannot be attached. Typically a malformed or foreign ID.","triggerScenarios":"Thrown at core/schema/module.go:1742 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-create the SourceMap via withSourceMap on the current session and use the fresh ID","Verify the ID string is a valid core.SourceMapID"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}