BIT-31961 — third recurrence (ERRSIG e4af6ce83729)
saveHeadshot() in apps/api/src/sports/service.ts awaited this.deps.fetch() with no try/catch. When the headshot URL was unreachable, the bare undici TypeError: fetch failed propagated to the caller's .catch, which logged it via log.warn({err}).
Pino's logHooks fingerprints any warn carrying an Error, and a bare undici fetch failure has no stack frame in our code, so it collapsed into the same ERRSIG (e4af6ce83729) as every other unwrapped fetch site in the api component — reopening BIT-31961 a third time even though the stripe and invoicexpress call sites (PR #256) were already wrapped and deployed.
The headshot batch runs in the api process via archive.syncSquads → sports.syncEventSquads, so its component is api — matching the recurring fingerprint.
Fix
Catch the network failure inside saveHeadshot, log the reason as a plain string (no err object, so logHooks does not fingerprint a bare TypeError), and return false. A headshot that can't be downloaded is not worth paging; the next sync retries it. This is the last bare fetch call site reachable from the api component.
Tests
npx vitest run apps/api/src/sports/service.test.ts — 10/10 passing (new regression test asserting no bare err reaches the warn path).
npx tsc --noEmit -p apps/api/tsconfig.json — clean for touched files.
apps/api/test/{shop,invoicing,desktop-updates} failures are pre-existing (DB-dependent integration tests, fail identically on clean main).
## BIT-31961 — third recurrence (ERRSIG e4af6ce83729)
`saveHeadshot()` in `apps/api/src/sports/service.ts` awaited `this.deps.fetch()` with no try/catch. When the headshot URL was unreachable, the bare undici `TypeError: fetch failed` propagated to the caller's `.catch`, which logged it via `log.warn({err})`.
Pino's `logHooks` fingerprints any warn carrying an Error, and a bare undici fetch failure has no stack frame in our code, so it collapsed into the **same ERRSIG** (`e4af6ce83729`) as every other unwrapped fetch site in the `api` component — reopening BIT-31961 a third time even though the stripe and invoicexpress call sites (PR #256) were already wrapped and deployed.
The headshot batch runs in the api process via `archive.syncSquads → sports.syncEventSquads`, so its component is `api` — matching the recurring fingerprint.
### Fix
Catch the network failure inside `saveHeadshot`, log the reason as a plain string (no `err` object, so `logHooks` does not fingerprint a bare TypeError), and return `false`. A headshot that can't be downloaded is not worth paging; the next sync retries it. This is the last bare `fetch` call site reachable from the `api` component.
### Tests
- `npx vitest run apps/api/src/sports/service.test.ts` — 10/10 passing (new regression test asserting no bare `err` reaches the warn path).
- `npx tsc --noEmit -p apps/api/tsconfig.json` — clean for touched files.
- `apps/api/test/{shop,invoicing,desktop-updates}` failures are pre-existing (DB-dependent integration tests, fail identically on clean main).
Paperclip-Issue: BIT-31961
Paperclip-ERRSIG: e4af6ce83729
saveHeadshot() awaited this.deps.fetch() with no try/catch. When the headshot
URL was unreachable (DNS, connection reset, timeout), the bare undici
TypeError: fetch failed propagated to the caller's .catch, which logged it via
log.warn({err}). Pino's logHooks fingerprints any warn carrying an Error, and a
bare undici fetch failure has no stack frame in our code, so it collapsed into
the same ERRSIG (e4af6ce83729) as every other unwrapped fetch site in the api
component — reopening BIT-31961 a third time even though the stripe and
invoicexpress call sites (PR #256) were already wrapped and deployed.
A headshot that can't be downloaded is not worth paging: catch the network
failure inside saveHeadshot, log the reason as a plain string (no err object,
so logHooks does not fingerprint it), and return false. The next sync retries
it. This is the last bare fetch call site reachable from the api component.
Paperclip-Issue: BIT-31961
Paperclip-ERRSIG: e4af6ce83729
spark
merged commit a661742733 into main2026-11-20 04:30:06 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
BIT-31961 — third recurrence (ERRSIG e4af6ce83729)
saveHeadshot()inapps/api/src/sports/service.tsawaitedthis.deps.fetch()with no try/catch. When the headshot URL was unreachable, the bare undiciTypeError: fetch failedpropagated to the caller's.catch, which logged it vialog.warn({err}).Pino's
logHooksfingerprints any warn carrying an Error, and a bare undici fetch failure has no stack frame in our code, so it collapsed into the same ERRSIG (e4af6ce83729) as every other unwrapped fetch site in theapicomponent — reopening BIT-31961 a third time even though the stripe and invoicexpress call sites (PR #256) were already wrapped and deployed.The headshot batch runs in the api process via
archive.syncSquads → sports.syncEventSquads, so its component isapi— matching the recurring fingerprint.Fix
Catch the network failure inside
saveHeadshot, log the reason as a plain string (noerrobject, sologHooksdoes not fingerprint a bare TypeError), and returnfalse. A headshot that can't be downloaded is not worth paging; the next sync retries it. This is the last barefetchcall site reachable from theapicomponent.Tests
npx vitest run apps/api/src/sports/service.test.ts— 10/10 passing (new regression test asserting no bareerrreaches the warn path).npx tsc --noEmit -p apps/api/tsconfig.json— clean for touched files.apps/api/test/{shop,invoicing,desktop-updates}failures are pre-existing (DB-dependent integration tests, fail identically on clean main).Paperclip-Issue: BIT-31961
Paperclip-ERRSIG: e4af6ce83729
saveHeadshot() awaited this.deps.fetch() with no try/catch. When the headshot URL was unreachable (DNS, connection reset, timeout), the bare undici TypeError: fetch failed propagated to the caller's .catch, which logged it via log.warn({err}). Pino's logHooks fingerprints any warn carrying an Error, and a bare undici fetch failure has no stack frame in our code, so it collapsed into the same ERRSIG (e4af6ce83729) as every other unwrapped fetch site in the api component — reopening BIT-31961 a third time even though the stripe and invoicexpress call sites (PR #256) were already wrapped and deployed. A headshot that can't be downloaded is not worth paging: catch the network failure inside saveHeadshot, log the reason as a plain string (no err object, so logHooks does not fingerprint it), and return false. The next sync retries it. This is the last bare fetch call site reachable from the api component. Paperclip-Issue: BIT-31961 Paperclip-ERRSIG: e4af6ce83729