Skip to main content

HTTP errors

Beta

This page documents the Bugsee JavaScript SDK, which is in beta (0.1.x) and can change between betas.

Network capture already records every request in the bundle of any report. With HTTP error detection, a request that comes back with a server error also files a report of its own.

HTTP error detection is off by default.

OptionTypeDefaultDescription
detectHttpErrorsbooleanfalseReport HTTP responses with a status from 500 to 599.
import { launch } from '@bugsee/bugsee';

launch('<your_app_token>', {
detectHttpErrors: true,
});

It needs network capture (captureNetwork, on by default). It watches the requests made by the app: fetch and XHR in a browser, fetch and node:http on a server.

What is reported​

ResponseReported
500 to 599Yes
4xxNo. Validation errors, auth challenges and conditional requests are expected.
A failed or aborted request with no HTTP statusNo
WebSocket, server-sent events, WebTransport and beaconsNo

Deduplication​

Each combination of method, endpoint and status is reported once per session, so a retry loop or a polling request does not file the same report again. The endpoint is the URL without its query, fragment and credentials, and path segments that look like identifiers or tokens (numeric ids, UUIDs, long hexadecimal strings, e-mail addresses and similar) are replaced by a placeholder. So /orders/1 and /orders/2 count as one endpoint.

As a backstop, at most 20 reports are filed in any 60-second window, and at most 1000 distinct combinations are remembered per session.

The report​

FieldValue
TypeError, with the priority high
SummaryHTTP <status> <status text>, for example HTTP 503 Service Unavailable
DomainHttpError::Server
GroupingOne synthetic stack frame, <METHOD> <url> <status>, so reports group by endpoint and exact status
Attributeshttp_status_code, http_method, http_url and, when present, http_status_text

The priority is fixed. reportDefaultErrorPriority does not change it.

The URL in the report has its query removed and goes through the default URL redaction.

Found an issue, typo, or wrong statement on this page? Report it now →