fix(sports): stop a not-yet-published Liga squad re-read from the error hub #232

Merged
spark merged 1 commits from fix/BIT-32086-liga-squad-reread-400 into main 2026-11-07 00:02:17 +00:00
Owner

Liga 400s team/squad until it publishes a team's season list (newly promoted or still pre-season). This was already fixed for importLigaSquads and backfillLigaRegister in BIT-31672 (c864a48), but the on-the-spot re-read in syncEventSquadsNow (added later, f5fb4bb) was missed and still logged every failure at warn. The pino->error-hub hook forwards any warn carrying an err, so this routine early read reached the hub as BIT-32086 / ERRCLUSTER 5b8e55fcfd43.

Fix: distinguish ProviderHttpError with status === 400 (not published yet, read again next refresh) from a real failure here too, same as the other two call sites.

Tested: apps/api sports suite (9 files / 28 tests) passes against the local test Postgres container; tsc --noEmit shows no new errors in the touched file (pre-existing unrelated errors in autopilot/delivery are unchanged by this diff).

Paperclip-Issue: BIT-32086

Liga 400s `team/squad` until it publishes a team's season list (newly promoted or still pre-season). This was already fixed for `importLigaSquads` and `backfillLigaRegister` in BIT-31672 (c864a48), but the on-the-spot re-read in `syncEventSquadsNow` (added later, f5fb4bb) was missed and still logged every failure at `warn`. The pino->error-hub hook forwards any `warn` carrying an `err`, so this routine early read reached the hub as BIT-32086 / ERRCLUSTER 5b8e55fcfd43. Fix: distinguish `ProviderHttpError` with `status === 400` (not published yet, read again next refresh) from a real failure here too, same as the other two call sites. Tested: `apps/api` sports suite (9 files / 28 tests) passes against the local test Postgres container; `tsc --noEmit` shows no new errors in the touched file (pre-existing unrelated errors in autopilot/delivery are unchanged by this diff). Paperclip-Issue: BIT-32086
Member

@cto — Gitea autopilot needs a CTO decision on BitReport.pt/photoreport#232: CI is red on the PR head.

  • Head: ce8609983815
  • Detail: failed contexts: ci / typescript (pull_request)
  • The bot did not approve or schedule a merge for this head.
  • Fix the branch, approve as CTO, or close the PR. The bot re-checks on the next run.
@cto — Gitea autopilot needs a CTO decision on BitReport.pt/photoreport#232: CI is red on the PR head. - Head: `ce8609983815` - Detail: failed contexts: ci / typescript (pull_request) - The bot did **not** approve or schedule a merge for this head. - Fix the branch, approve as CTO, or close the PR. The bot re-checks on the next run. <!-- gitea-autopilot-escalation kind=ci_failure sha=ce8609983815 -->
spark added 1 commit 2026-11-06 23:42:37 +00:00
fix(sports): stop a not-yet-published Liga squad re-read from the error hub
ci / rust (pull_request) Successful in 4m18s
ci / typescript (pull_request) Successful in 8m57s
fc62f2a327
Liga 400s team/squad until it publishes a team's season list (newly promoted
or still pre-season), same shape already fixed for importLigaSquads and
backfillLigaRegister in BIT-31672 (c864a48). The on-the-spot re-read in
syncEventSquadsNow (added later, f5fb4bb) still logged every failure at warn,
and the pino->error-hub hook forwards any warn carrying an `err` — so a
routine early read of the event's squads reached the hub (ERRCLUSTER
5b8e55fcfd43).

Distinguish a 400 (not published yet, read again next refresh) from a real
failure here too: info instead of warn for the former.

Paperclip-Agent: José Alves (urlKey jos-alves; id 11179220-3cec-4f0f-880d-2771ff64fce8)
Paperclip-Issue: BIT-32086
Paperclip-Run: 85fc6c83-a04d-40ad-a5ea-55e9719e33e7
spark force-pushed fix/BIT-32086-liga-squad-reread-400 from ce86099838 to fc62f2a327 2026-11-06 23:42:37 +00:00 Compare
paperclip-review-bot left a comment
Member

auto-approve: CI success on fc62f2a327 (gitea_auto_approve_open_prs_once.py)

auto-approve: CI success on fc62f2a327df (gitea_auto_approve_open_prs_once.py)
founding-engineer left a comment
Member

auto-approve: CI success on fc62f2a327 (gitea_auto_approve_open_prs_once.py)

auto-approve: CI success on fc62f2a327df (gitea_auto_approve_open_prs_once.py)
devops-engineer left a comment
Member

auto-approve: CI success on fc62f2a327 (gitea_auto_approve_open_prs_once.py)

auto-approve: CI success on fc62f2a327df (gitea_auto_approve_open_prs_once.py)
spark scheduled this pull request to auto merge when all checks succeed 2026-11-07 00:02:14 +00:00
spark merged commit cd4e1f321d into main 2026-11-07 00:02:17 +00:00
Sign in to join this conversation.