{"record":{"id":"5d399fc2958fd5b6","repo":"wtfutil/wtf","slug":"could-not-find-board-with-name-s","errorCode":null,"errorMessage":"could not find board with name %s","messagePattern":"could not find board with name (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/todo_plus/backend/trello.go","lineNumber":55,"sourceCode":"\nfunc getBoardID(client *trello.Client, username, boardName string) (string, error) {\n\tmember, err := client.GetMember(username, trello.Defaults())\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tboards, err := member.GetBoards(trello.Defaults())\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tfor _, board := range boards {\n\t\tif board.Name == boardName {\n\t\t\treturn board.ID, nil\n\t\t}\n\t}\n\n\treturn \"\", fmt.Errorf(\"could not find board with name %s\", boardName)\n}\n\nfunc getListId(client *trello.Client, boardID string, listName string) (string, error) {\n\tboard, err := client.GetBoard(boardID, trello.Defaults())\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tboardLists, err := board.GetLists(trello.Defaults())\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tfor _, list := range boardLists {\n\t\tif list.Name == listName {\n\t\t\treturn list.ID, nil\n\t\t}\n\t}","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/wtfutil/wtf/blob/bb838c1ccb0f0f3223690df44afdec663d622881/modules/todo_plus/backend/trello.go#L37-L73","documentation":"getBoardID searches the boards accessible to the configured Trello API key/token for one whose name matches the configured board name, and returns this error when no board matches. Trello boards are matched by exact name.","triggerScenarios":"Setup() with a boardName that matches none of the boards returned by client.GetBoards — name typo, wrong-case name, or the board not shared with the account owning the token.","commonSituations":"Board renamed in Trello after the widget config was written; board belonging to another team/account than the API token's user; trailing whitespace or case mismatch in config; revoked or wrong-scope token that can't see the board.","solutions":["Compare the configured name exactly (case and whitespace) with the board name in Trello","Re-fetch boards: log into Trello and confirm the account tied to your API token can see the board","Use the board's short-link/ID instead of a name if renames keep breaking config","Regenerate the Trello token if it belongs to the wrong account"],"exampleFix":"// before\nboardName := \"My Tasks\"   // board actually named \"my tasks\"\n// after\nboardName := \"my tasks\"","handlingStrategy":"validation","validationCode":"boards, _ := client.GetBoards(trello.Defaults())\nnames := map[string]bool{}\nfor _, b := range boards { names[b.Name] = true }\nif !names[boardName] { return fmt.Errorf(\"board %q not visible to token\", boardName) }","typeGuard":"func boardExists(boards []trello.Board, name string) bool {\n    for _, b := range boards { if b.Name == name { return true } }\n    return false\n}","tryCatchPattern":"id, err := getBoardID(client, boardName)\nif err != nil {\n    if strings.HasPrefix(err.Error(), \"could not find board\") {\n        return fmt.Errorf(\"check Trello config: %w\", err)\n    }\n    return err\n}","preventionTips":["Copy the board name exactly (case and whitespace) from Trello","Prefer the board ID/short-link over the name to survive renames","Ensure the API token's account is a member of the board","Re-check config after renaming boards in Trello"],"tags":["trello","configuration","not-found","go"],"backgroundTag":"resource-not-found","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"}