Overview
inboundFiltersIntegration drops exceptions you don't care about before they leave the process, so they never reach Buglapse or count toward your quota — expected failures like a client closing the connection early, or a known noisy error from a dependency.
On Node, the useful option is ignoreErrors: exceptions whose message matches any pattern are dropped. A string matches if the message contains it; a RegExp is tested against the message.
Usage
ts
import { use } from '@buglapse/node'
import { inboundFiltersIntegration } from '@buglapse/node/integrations'
use(inboundFiltersIntegration({
ignoreErrors: ['ECONNRESET', /^Request aborted/, 'socket hang up'],
}))Options
| Option | Type | Default | Description |
|---|---|---|---|
ignoreErrors | (string | RegExp)[] | ['Script error.'] | Drop exceptions whose message matches any pattern |
allowUrls | (string | RegExp)[] | [] | If set, keep only exceptions whose top stack frame URL matches |
denyUrls | (string | RegExp)[] | [] | Drop exceptions whose top stack frame URL matches |
The default 'Script error.' is a browser message and never matches on a server; passing ignoreErrors replaces it.
allowUrls / denyUrls are meant for the browser and are rarely useful here. They only see file://, http:// and https:// URLs in the stack: ES modules have file:///app/... frames, but CommonJS frames are bare paths (/app/dist/server.js:10:5) and never match. With allowUrls set, an exception with no such URL is dropped — in a CommonJS app, that's every exception.
For filtering by error class or anything beyond the message, use a preprocessor instead — see Capturing Errors → Cutting down noise. The project's Settings → Filters tab can also drop exceptions by name or message on the server side.