Blog

Insights on Nark Profiles, TypeScript code quality, and safe npm package usage.

Looking for notes on building Nark itself? See the Build Log.

Why Your GitHub Actions Security Scanner Shows Green When It's Doing Nothing

GitHub Actions reports green when `continue-on-error: true` swallows a crash AND `actions/upload-artifact@v4` warns instead of failing on a missing file. The combination silently breaks Nark, Semgrep, npm audit, and gitleaks — we hit it 18 times in a row this week before noticing. Three-line fix.

github actionsci cdsecurity scanningsemgrepgitleaksnark profiles

GitHub CodeQL vs Nark: How Security and Correctness Scanning Complement Each Other

GitHub CodeQL finds security vulnerabilities; Nark finds package-specific error handling gaps. Compare them, see when to use each, review the matching free-for-OSS / paid-for-commercial licensing model, and run both in GitHub Actions for complete TypeScript static analysis coverage.

codeqlgithubstatic analysissecurityerror handlingtypescriptnark profileslicensingopen source

How to Handle fetchQuery() Errors in TanStack Query

fetchQuery() throws on error, unlike useQuery which returns errors in an `error` property. Wrap every call in try-catch, or register a QueryCache({ onError }) global handler. Both are valid; mixing them is the strongest pattern.

tanstack queryreact querytypescripterror handlingssrnark profiles

How Do I Audit a Static Analysis Finding Before Opening a Pull Request?

Three checks before any static analysis finding becomes a PR: quote cited files instead of just listing paths, trace from user-facing entry to patched file rather than file outward, and read every caller of the throwing function for guard patterns. Lessons from a closed PR to OpenStatus.

static analysispull requestscode reviewoss contributionaudit checklistnark profilesopen source

How Do I Check If an OSS Repo Auto-Closes External Pull Requests?

Some open-source repos wire GitHub Actions to auto-close external PRs touching protected paths (CI, scripts, CHANGELOG, LICENSE) within seconds of opening. A 30-second grep on .github/workflows/ tells you before you waste an hour preparing a fix.

open sourcegithub actionspull requestsoss contributionnark profiles

How Do You Safely Parse Dates with dayjs in TypeScript?

dayjs uses lenient parsing by default — dayjs('2025-13-99') returns a valid Day.js object pointing at 2026-04-09. isValid() catches unparseable text but not semantic overflow. Use strict mode for known formats.

dayjstypescriptdate parsingerror handlingnark profiles

I Ran Nark Against My Own Codebase. Here's Every Violation It Found.

I built a static analyzer that checks whether TypeScript code handles npm package errors correctly. Then I pointed it at my own production app. 11 violations were real. 122 were false positives. Here's what I learned from both.

dogfoodingstatic analysistypescriptfalse positivesnark profilessuppressions

The Real Cost of One Unhandled Error in Production

A single unhandled AxiosError or Prisma P2002 costs more than you think. Late-night pages, lost customers, engineering hours, liability exposure, and the invisible tax on team morale. Here is the actual math.

production bugscost analysiserror handlingtypescriptnarkengineering managementincident response

Why Adopt Nark for Your Engineering Team

A guide for tech leads and engineering managers on adopting Nark. Reduce production incidents, improve CI quality gates, and give your team a tool that catches the bugs code review misses.

engineering managementnarktypescriptci cdcode qualitytech leaddeveloper experience

The 10 Most Common Unhandled Errors Across 6,200+ TypeScript Repos

We ranked the top 10 unhandled error patterns by frequency across 6,283 open source TypeScript repositories. 71,140 violations. Here's what breaks in production.

typescripterror handlingstatic analysisnark profilesopen sourceresearch

6 npm Packages Every TypeScript Project Should Run in CI

The six npm packages that belong in every TypeScript CI pipeline: TypeScript itself, ESLint, Prettier, Vitest, a security scanner, and Nark for dependency error handling.

typescriptci cdnpmeslintvitestnarkquality

Add Dependency Error Checking to Your TypeScript CI in 2 Minutes

Add Nark to your TypeScript CI pipeline in under 2 minutes. One command, one workflow step, catches unhandled npm package errors on every pull request.

typescriptci cdgithub actionsnpmerror handlingnark

Why AI Code Reviews Don't Replace Targeted Error Checking (and How to Use Both)

Claude Code, Copilot, Cursor, and CodeRabbit catch logic bugs. They don't deterministically check 165+ npm packages for unhandled errors. Here's how to use AI review and Nark together.

ai code reviewstatic analysiserror handlingtypescriptnark

Case Study: 134 Unguarded Axios Calls Across 35 Integrations in botpress/botpress

We found 134 bare axios calls without try-catch across 35 bot integrations in botpress/botpress. A network timeout, expired credential, or rate limit crashes the bot handler with a raw stack trace. The fire-and-forget analytics ping was re-throwing too.

axiostypescripterror handlingcase studynark profilesopen source

Case Study: ~100 API Routes in civitai/civitai Return 500 Instead of 400

We found approximately 100 Next.js API routes in civitai/civitai that call zod .parse() without try-catch. Any malformed request input produces a 500 Internal Server Error instead of a 400 Bad Request. Public endpoints are affected — no auth required.

zodtypescripterror handlingcase studynark profilesopen source

ESLint vs Semgrep vs Nark: What Each Catches in TypeScript

A practical comparison of ESLint, Semgrep, and Nark for TypeScript static analysis. What each tool catches, what each misses, and when to use all three.

eslintsemgrepnarktypescriptstatic analysisci cd

GitHub Actions Workflow: ESLint + Vitest + Nark for TypeScript Projects

A complete, copy-paste GitHub Actions workflow that runs ESLint, Vitest, and Nark on every TypeScript pull request. Catch style issues, test failures, and unhandled package errors before merge.

github actionseslintvitestnarktypescriptci cd

How to Add Nark to a Turborepo / pnpm Monorepo

Set up Nark in a Turborepo or pnpm workspace monorepo. Scan each package independently, cache results with Turbo, and add it to your CI pipeline.

turborepopnpmmonoreponarktypescriptci cd

How to Handle OpenAI API Errors in TypeScript

The OpenAI TypeScript SDK throws RateLimitError, AuthenticationError, APIConnectionError, and more. Here is how to catch and handle each one correctly so your AI features don't silently fail.

openaitypescripterror handlingainarkapi

How to Handle Redis Connection Errors in TypeScript

Redis clients in Node.js crash your process if you don't register an error handler. Here is how to handle Redis connection errors, reconnection, and timeouts in TypeScript with ioredis and node-redis.

redistypescripterror handlingioredisnode redisnark

Case Study: jwt.decode() Without jwt.verify() in NangoHQ/nango's OAuth Hooks

We found jwt.decode() used without jwt.verify() in NangoHQ/nango's OAuth post-connection hooks. The shared utility is named just decode() — no indication the token is unverified. The fix: rename to decodeUnverified() with a JSDoc warning.

jsonwebtokenjwttypescripterror handlingcase studynark profilessecurityopen source

Nark + CodeRabbit: AI Code Review Meets Deterministic Dependency Checking

CodeRabbit uses AI to review your code logic and intent. Nark deterministically checks whether your code handles the errors your npm dependencies throw. They solve different problems. Use both.

coderabbitnarktypescriptstatic analysisai code reviewerror handlingci cdnark profiles

Nark vs SonarQube: Code Quality Metrics vs Runtime Error Checking for TypeScript

SonarQube measures code quality metrics like complexity and duplication. Nark checks whether your code handles the runtime errors your npm packages throw. Here is how they differ and when to use both.

sonarqubenarktypescriptstatic analysiscode qualityerror handlingci cd

Socket.dev vs Nark: Supply Chain Security vs Runtime Error Checking for TypeScript

Socket.dev protects you from malicious npm packages. Nark catches missing error handling in the legitimate packages you already use. Here is how they differ and why TypeScript teams need both.

socketnarktypescriptsupply chain securityerror handlingnpmstatic analysisci cd

The Three Layers of TypeScript Dependency Safety: Supply Chain, SAST, and Completeness

Socket.dev protects what you install. Semgrep catches what you write wrong. Nark catches what you forgot to write. Here is the three-layer model for TypeScript dependency safety and how to run all three in CI.

typescriptstatic analysissocketsemgrepnarkci cderror handlingsupply chain securitynpm

TypeScript CI Quality Gates: The Complete Checklist (2026)

A complete checklist for TypeScript CI quality gates in 2026: type checking, linting, formatting, testing, security scanning, and dependency error handling.

typescriptci cdgithub actionseslinttestingnarkquality

We scanned 6,283 TypeScript repositories. Here's what we found.

We ran Nark across 6,283 open source TypeScript projects and found 71,140 unguarded error paths. Here's what the data says about error handling in the TypeScript ecosystem.

typescripterror handlingstatic analysisnark profilesopen source

What Happens When You Don't Handle Prisma P2002 in Production

Prisma throws PrismaClientKnownRequestError with code P2002 on unique constraint violations. If you don't catch it, your users see a 500 error instead of 'email already taken'. Here is what happens and how to fix it.

prismatypescripterror handlingp2002databasenark

Where Does Nark Store Scan Results? Understanding the .Nark Folder

Nark creates a .Nark folder to store local scan history, violation files, and run artifacts. Here's exactly how it decides where that folder goes — and what to do when it ends up in the wrong place.

getting startedclitroubleshootingtsconfig

Why AI-Generated TypeScript Code Skips Error Handling (And How to Catch It)

AI coding assistants write syntactically correct TypeScript but routinely miss package-specific error handling. Here's why, and how to automatically catch the gaps.

aicopilotcursortypescripterror handlingnarkcode quality

Why TypeScript Needs a Dependency Error Checker (And ESLint Isn't Enough)

ESLint and TypeScript's type system enforce code correctness, but neither knows what your npm dependencies throw at runtime. Here's the gap they leave open.

typescripterror handlingstatic analysisnpmnark

How to Handle Axios Errors in TypeScript (Complete Guide)

Learn how to handle all three axios error types in TypeScript: HTTP errors, network failures, and setup errors with axios.isAxiosError() type narrowing.

axiostypescripterror handlinghttpnark

How to Handle Prisma Errors in TypeScript (P2002, P2025, and More)

Handle Prisma error codes P2002 (duplicate), P2025 (not found), P2003 (foreign key), and connection errors with proper TypeScript patterns.

prismatypescripterror handlingdatabasenark

How to Handle Stripe Errors in Node.js and TypeScript (StripeCardError, Rate Limits, Webhooks)

Handle all 5 Stripe error types in Node.js: StripeCardError, rate limits, webhook signature verification, authentication errors, and connection errors.

stripenodejstypescripterror handlingpaymentsnark

What Static Analysis Tools Check for Missing Error Handling in TypeScript?

Compare ESLint, TypeScript strict mode, Semgrep, and Nark for catching missing try-catch around axios, Prisma, and Stripe calls in TypeScript.

static analysiseslinttypescripterror handlingnark

How to Add Nark to Your CircleCI Pipeline

Integrate Nark Profile verification into CircleCI. Automatically catch unhandled npm package failures on every commit.

ci cdcirclecitypescriptnpmtutorial

How to Add Nark to Your GitHub Actions CI

Set up Nark Profile verification in your GitHub Actions pipeline. Catch unhandled npm package failures on every pull request in under 5 minutes.

ci cdgithub actionstypescriptnpmtutorial

npx nark: Scan Your TypeScript Project in 30 Seconds

One command, zero config. Run npx nark to find every unhandled failure mode in your npm package usage — timeouts, rate limits, connection failures, and more.

getting startedtypescriptnpmclitutorial

What Is Nark Profile Verification?

Learn how Nark Profiles help you catch unsafe npm package usage before it reaches production — errors, timeouts, rate limits, and failure states your tests never touched.

nark profilesnpmtypescriptcode quality