{"record":{"id":"82d8520243e62d25","repo":"wtfutil/wtf","slug":"missing-project-id","errorCode":null,"errorMessage":"missing project id","messagePattern":"missing project id","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/asana/widget.go","lineNumber":116,"sourceCode":"\t}\n\n\tif widget.settings.apiKey != \"\" {\n\t\twidget.settings.token = widget.settings.apiKey\n\t} else {\n\t\twidget.settings.token = os.Getenv(\"WTF_ASANA_TOKEN\")\n\t}\n\n\tif widget.settings.token == \"\" {\n\t\treturn nil, fmt.Errorf(\"missing environment variable token or apikey config\")\n\t}\n\n\tsubMode := mode\n\tif allUsers && mode != \"workspace\" {\n\t\tsubMode += \"_all\"\n\t}\n\n\tif projectId == \"\" && strings.HasPrefix(subMode, \"project\") {\n\t\treturn nil, fmt.Errorf(\"missing project id\")\n\t}\n\n\tif workspaceId == \"\" && subMode == \"workspace\" {\n\t\treturn nil, fmt.Errorf(\"missing workspace id\")\n\t}\n\n\tvar tasks []*TaskItem\n\tvar err error\n\n\t//lint:ignore QF1002 An untagged switch makes sense here.\n\tswitch {\n\tcase strings.HasPrefix(subMode, \"project_sections\"):\n\t\ttasks, err = fetchTasksFromProjectSections(widget.settings.token, projectId, sections, subMode)\n\tcase strings.HasPrefix(subMode, \"project\"):\n\t\ttasks, err = fetchTasksFromProject(widget.settings.token, projectId, subMode)\n\tcase subMode == \"workspace\":\n\t\ttasks, err = fetchTasksFromWorkspace(widget.settings.token, workspaceId, subMode)\n\tdefault:","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/wtfutil/wtf/blob/bb838c1ccb0f0f3223690df44afdec663d622881/modules/asana/widget.go#L98-L134","documentation":"Validation guard in Fetch: the mode is project or project_sections (including the _all variants), but projectId was empty, so the widget has no Asana project to fetch tasks from and returns before issuing an API request.","triggerScenarios":"Thrown at modules/asana/widget.go:116 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set projectId in the Asana widget configuration","Copy the project ID from the Asana project URL when the project is open","Switch mode to workspace if a project-scoped view was not intended"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bb838c1ccb0f0f3223690df44afdec663d622881","analyzedAt":"2026-09-03T17:02:45.030Z","contentChangedAt":"2026-09-03T17:02:45.030Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}