cloudflare / cloudflare/agentic-inbox
Log silent catches in deep-scan pipeline
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 964
- PR merge metrics
- No merged PRs in 30d
Description
[workers/intel/deep-scan.ts](workers/intel/deep-scan.ts) has multiple `.catch(() => null)` / `.catch(() => {})` sites in the URL/domain/feed analysis pipeline that swallow errors with no context. When a security check silently fails in production we have no signal to debug from.
### Sites
- [workers/intel/deep-scan.ts:71](workers/intel/deep-scan.ts#L71) — `getStoredVerdict`
- [workers/intel/deep-scan.ts:118](workers/intel/deep-scan.ts#L118)
- [workers/intel/deep-scan.ts:120](workers/intel/deep-scan.ts#L120) — `moveEmail` to QUARANTINE
- [workers/intel/deep-scan.ts:126](workers/intel/deep-scan.ts#L126) — `updateDeepScanStatus`
- [workers/intel/deep-scan.ts:146](workers/intel/deep-scan.ts#L146) — `resolveUrl`
- [workers/intel/deep-scan.ts:166](workers/intel/deep-scan.ts#L166) — `lookupDomainAge`
- [workers/intel/deep-scan.ts:171](workers/intel/deep-scan.ts#L171) — `checkUrlAgainstFeeds`
- [workers/intel/deep-scan.ts:183](workers/intel/deep-scan.ts#L183)
- [workers/intel/deep-scan.ts:222](workers/intel/deep-scan.ts#L222)
### Proposal
Replace each `.catch(() => null)` with a small helper or inline `.catch((err) => { console.warn("deep-scan:", { mailboxId, emailId, err: String(err) }); return null; })`. Keep the non-throwing behavior — just emit a structured log line.
### Why
Deep-scan is a security pipeline; silent failures hide both real bugs and ongoing degradations of upstream services (RDAP, feed lookups, URL resolver).
Contributor guide
Assessment
This issue has not been assessed yet.