wtfutil/wtf · error
missing project id
Error message
missing project id
What it means
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.
Source
Thrown at modules/asana/widget.go:116
}
if widget.settings.apiKey != "" {
widget.settings.token = widget.settings.apiKey
} else {
widget.settings.token = os.Getenv("WTF_ASANA_TOKEN")
}
if widget.settings.token == "" {
return nil, fmt.Errorf("missing environment variable token or apikey config")
}
subMode := mode
if allUsers && mode != "workspace" {
subMode += "_all"
}
if projectId == "" && strings.HasPrefix(subMode, "project") {
return nil, fmt.Errorf("missing project id")
}
if workspaceId == "" && subMode == "workspace" {
return nil, fmt.Errorf("missing workspace id")
}
var tasks []*TaskItem
var err error
//lint:ignore QF1002 An untagged switch makes sense here.
switch {
case strings.HasPrefix(subMode, "project_sections"):
tasks, err = fetchTasksFromProjectSections(widget.settings.token, projectId, sections, subMode)
case strings.HasPrefix(subMode, "project"):
tasks, err = fetchTasksFromProject(widget.settings.token, projectId, subMode)
case subMode == "workspace":
tasks, err = fetchTasksFromWorkspace(widget.settings.token, workspaceId, subMode)
default:View on GitHub (pinned to bb838c1ccb)
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at modules/asana/widget.go:116 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of wtfutil/wtf@bb838c1ccb (2026-09-03).
Data as JSON: /api/errors/82d8520243e62d25.
Report an issue: GitHub.