{"record":{"id":"930199b7c0440bf6","repo":"JanDeDobbeleer/oh-my-posh","slug":"no-game-score-found-for-team","errorCode":null,"errorMessage":"no game score found for team","messagePattern":"no game score found for team","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/segments/nba.go","lineNumber":156,"sourceCode":"func (nba *Nba) Enabled() bool {\n\tdata, err := nba.getResult()\n\tif err != nil || !data.GameStatus.Valid() {\n\t\treturn false\n\t}\n\n\tnba.NBAData = *data\n\n\treturn true\n}\n\nfunc (nba *Nba) findGameScoreByTeamTricode(games []Game, teamTricode string) (*Game, error) {\n\tfor _, game := range games {\n\t\tif game.HomeTeam.TeamTricode == teamTricode || game.AwayTeam.TeamTricode == teamTricode {\n\t\t\treturn &game, nil\n\t\t}\n\t}\n\n\treturn nil, errors.New(\"no game score found for team\")\n}\n\nfunc (nba *Nba) findGameSchedulebyTeamTricode(games []ScheduledGame, teamTricode string) (*ScheduledGame, error) {\n\tfor _, game := range games {\n\t\tif game.VtAbbreviation == teamTricode || game.HtAbbreviation == teamTricode {\n\t\t\treturn &game, nil\n\t\t}\n\t}\n\n\treturn nil, errors.New(\"no scheduled game found for team\")\n}\n\nfunc (nba *Nba) parseTimetoUTC(timeEST, date string) string {\n\tcombinedTime := date + \" \" + timeEST\n\ttimeUTC, err := time.Parse(\"01/02/2006 03:04 PM\", combinedTime)\n\tif err != nil {\n\t\treturn \"\"\n\t}","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/JanDeDobbeleer/oh-my-posh/blob/0976794618c5ed95de0985dded50de1b4dc914cb/src/segments/nba.go#L138-L174","documentation":"The nba segment fetches the NBA scoreboard and looks up a game by team tricode (3-letter abbreviation). findGameScoreByTeamTricode() returns 'no game score found for team' when no game in the scoreboard data matches the configured team's tricode.","triggerScenarios":"retrieveScoreData runs while the day's scoreboard contains no game for the configured team: team not playing today, wrong tricode in theme config, or game outside the fetched date range.","commonSituations":"Offseason or non-game days; user typo'd the tricode (must be the official NBA abbreviation, e.g. 'LAL', 'BOS'); team relocated/renamed and config kept the old code; timezone boundaries meaning the game falls on a different scoreboard date.","solutions":["Verify the `team_tricode` (or equivalent) option matches the official NBA tricode for the team.","Remember the segment only shows during/around games — it is expected to hide when the team isn't playing.","Check the NBA data feed manually for the date in question to confirm no game is scheduled.","Use display_mode or fallback text options so the segment renders nothing instead of erroring visibly."],"exampleFix":"// before\n\"team_tricode\": \"LAC\"  // intended Clippers? LAC vs LAL confusion\n// after\n\"team_tricode\": \"LAL\"","handlingStrategy":"fallback","validationCode":"tricode=\"LAL\"; case $tricode in LAL|BOS|GSW|NYK) echo ok;; *) echo 'use official NBA tricode';; esac","typeGuard":null,"tryCatchPattern":"game, err := findGameScoreByTeamTricode(games, tricode)\nif err != nil {\n    // no game today: render nothing\n}","preventionTips":["Use the official NBA tricode for the team (check nba.com team pages).","Expect the segment to be empty on off days, offseason, and outside game windows.","Update the tricode if a team renames or relocates."],"tags":["api","nba","not-found","config"],"backgroundTag":"no-data-found","analyzedSha":"0976794618c5ed95de0985dded50de1b4dc914cb","analyzedAt":"2026-08-31T23:41:19.708Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}