Fix the doubled /leaderboard path — the fielding feed 404'd silently
BASE already ends in /leaderboard, so the new feed built .../leaderboard/leaderboard/outs_above_average and 404'd. Because a failing feed degrades to an EMPTY index by design -- correct behaviour, so one broken source cannot fail the whole mechanism pull -- it surfaced as 'fielding_oaa: 0 rows' rather than as an error, which reads exactly like 'Statcast has no fielding data'. Worth noting as a class: graceful degradation makes a wiring bug look like an honest absence. Verified: 514 fielders, 31 teams. Cubs +56 OAA, Mariners -29. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W1sivYNqY2TS5ftykmHBU9
This commit is contained in:
@@ -71,7 +71,10 @@ const FEEDS = Object.freeze({
|
||||
// other six feeds measures fielding at all, and the obvious substitutes
|
||||
// (a team's pitchers' hits-allowed) conflate pitching WITH defence and would
|
||||
// validate the wrong skill. Measured live 2026-08-03: 513 fielders.
|
||||
fielding_oaa: (y) => `${BASE}/leaderboard/outs_above_average?type=Fielder&startYear=${y}&endYear=${y}&split=no&team=&range=year&min=1&pos=&roles=&viz=hide&csv=true`,
|
||||
// NOTE: BASE already ends in /leaderboard — do not repeat it here (a doubled
|
||||
// path 404s, and because a failed feed degrades to an EMPTY index by design,
|
||||
// it reports as "0 fielders" rather than as an error).
|
||||
fielding_oaa: (y) => `${BASE}/outs_above_average?type=Fielder&startYear=${y}&endYear=${y}&split=no&team=&range=year&min=1&pos=&roles=&viz=hide&csv=true`,
|
||||
});
|
||||
|
||||
/** statsapi — free, no key. Two calls that complete the Tier-A joins.
|
||||
|
||||
Reference in New Issue
Block a user