What Is Nark Profile Verification?
By Nark Team
The Problem: Invisible Failure Modes
Every npm package you install comes with a hidden set of behaviors your code must handle correctly. HTTP clients can timeout. Database queries can fail with constraint violations. Payment APIs can throw rate limit errors.
Most codebases handle the happy path and hope for the best.
What Are Nark Profiles?
A Nark Profile is a formal specification of what a package can actually do at runtime — every error type, every edge case, every failure mode documented in the package's source code and documentation.
When you call axios.get(), the Profile specifies:
- Network errors (ECONNREFUSED, ECONNRESET, ETIMEDOUT)
- HTTP error responses (4xx, 5xx status codes)
- Request cancellation
- Timeout errors
Your code either handles these cases, or it doesn't. Nark tells you which.
How Nark Uses Profiles
Nark scans your TypeScript codebase and cross-references every package call against its Nark Profile. For each call site, it checks:
- Is the call wrapped in error handling? (try/catch, .catch(), error callbacks)
- Does the error handling cover the Profile's failure modes? (not just generic catch-all)
- Are edge cases like timeouts and rate limits addressed?
The result is a clear report showing exactly where your code has gaps — before those gaps become production incidents.
Getting Started
Install Nark and run your first scan in under five minutes. Visit our pricing page to choose a plan, or sign up for a free trial to see it in action.