Skip to content

fix(intel): add console.warn to silent catch blocks for observability#807

Open
NewCoder3294 wants to merge 1 commit intokoala73:mainfrom
NewCoder3294:fix/intel-handler-observability
Open

fix(intel): add console.warn to silent catch blocks for observability#807
NewCoder3294 wants to merge 1 commit intokoala73:mainfrom
NewCoder3294:fix/intel-handler-observability

Conversation

@NewCoder3294
Copy link
Contributor

Summary

  • Addresses lint issue L-14: silent catch blocks in intelligence and military handlers are now observable in production logs
  • Added console.warn with handler-name prefixes (e.g. [get-country-intel-brief]) and the caught error to every previously-empty catch block across 4 files
  • No logic changes — only logging additions to existing catch blocks

Files modified

File Catch blocks updated
server/worldmonitor/intelligence/v1/get-country-intel-brief.ts 3 (context parse, GROQ fetch, cached fetch)
server/worldmonitor/intelligence/v1/classify-event.ts 3 (JSON.parse, classification fetch, cached fetch)
server/worldmonitor/intelligence/v1/get-pizzint-status.ts 3 (PizzINT API, GDELT fetch, cached fetch)
server/worldmonitor/military/v1/list-military-bases.ts 1 (JSON.parse of base metadata)

Test plan

  • Verify type checks pass (npm run typecheck) — confirmed passing in pre-push hook
  • Grep for console.warn in the 4 files to confirm all silent catches now log
  • Deploy to staging and trigger error paths to verify log output is present and grep-friendly
  • Confirm no behavioral changes — all catch blocks still return the same fallback values

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Mar 2, 2026

@NewCoder3294 is attempting to deploy a commit to the Elie Team on Vercel.

A member of the Team first needs to authorize it.

@koala73 koala73 added Not Ready to Merge PR has conflicts, failing checks, or needs work Low Value Trivial, unnecessary, or not aligned with project needs labels Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Low Value Trivial, unnecessary, or not aligned with project needs Not Ready to Merge PR has conflicts, failing checks, or needs work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants