Overview
A failed HTTP request doesn't throw a JavaScript exception — a 500 from your API is a perfectly normal Response as far as the browser is concerned — so it would otherwise never show up in Buglapse. httpErrorsIntegration watches every fetch() and XMLHttpRequest and sends an error-level log for each one that:
- responds with a status at or above
statusThreshold(500by default), or - fails at the network level (offline, DNS failure, blocked by CORS).
Each log carries method, url and status as attributes, so you can search and group them on the Logs page. The SDK's own requests to /api/envelope are ignored.
Usage
ts
import { use } from '@buglapse/browser'
import { httpErrorsIntegration } from '@buglapse/browser/integrations'
use(httpErrorsIntegration())
// report 4xx responses as well:
use(httpErrorsIntegration({ statusThreshold: 400 }))Options
| Option | Type | Default | Description |
|---|---|---|---|
statusThreshold | number | 500 | Lowest response status that's reported |
Your code still receives the response (or the thrown network error) unchanged.