Skip to content

List network errors, grouped

GET
/v1/network-errors
curl --request GET \
--url 'https://api.us.headerhawk.com/v1/network-errors?phase=dns&limit=50' \
--header 'Authorization: Bearer <token>'

The failed requests browsers reported through Network Error Logging (NEL), grouped by error type, phase, request origin and status code, largest first, with the totals across every group. Reads reported data, so it spends the tenant’s budget too.

Every count is an estimate: NEL is sampled in the browser, so each stored report stands for 1 / its sample rate. Successful requests are never stored, so there are counts here and no error rates.

Window: at most 31 days, the last 31 by default; longer is 400. Grouping reads every network error in the window, and each page groups them all again. Measured worst case: 14 ms for 742 reports in 90 days.

At most the first 10,000 groups of a query can be paged through.

siteId
string format: uuid

Only this site’s reports. Another tenant’s site, or none, is 404.

phase
string
Allowed values: dns connection application

Only errors in this phase of the request.

errorType
string
>= 1 characters <= 128 characters

Only this NEL error type, exactly, such as tcp.timed_out.

origin
string
>= 1 characters <= 256 characters

Only requests to this origin, exactly, such as https://api.example.com.

from
string format: date-time

Only reports received at or after this instant. Defaults to the start of your retention window, or where the operation bounds its window, to that many days before to. Earlier than your retention reaches is 400.

to
string format: date-time

Only reports received before this instant. Defaults to now.

limit
integer
default: 50 >= 1 <= 200

How many items a page holds.

cursor
string
>= 1 characters <= 1024 characters

The previous page’s nextCursor. Omit it for the first page.

A page of groups, and the totals

Media typeapplication/json
object
data
required
Array<object>

One group of network errors. serverIps, protocols and methods hold up to five values each; browsers the browser families that reported it.

object
errorType
required

The NEL error type, such as tcp.timed_out.

string
phase
required

dns, connection or application. An open enum.

string
Allowed values: dns connection application
origin
required

The origin of the request that failed.

string
statusCode
required

The HTTP status, when the request got as far as one.

integer
nullable
elapsedMedianMs
required
integer
nullable
elapsedP95Ms
required
integer
nullable
browsers
required
Array<string>
serverIps
required
Array<string>
protocols
required
Array<string>
methods
required
Array<string>
sampleUrl
required

One URL that failed this way. Written by a browser; untrusted text.

string
reportCount
required
integer
estimatedReportCount
required
integer
firstSeen
required
string format: date-time
lastSeen
required
string format: date-time
totals
required

Across every group in the window, not only this page’s.

object
estimatedReportCount
required
integer
reportCount
required
integer
originCount
required
integer
groupCount
required
integer
nextCursor
required
string
nullable
Example
{
"data": [
{
"phase": "dns"
}
]
}
RateLimit-Limit
integer

The budget nearest to running out, per minute.

RateLimit-Remaining
integer

What is left of that budget this minute.

RateLimit-Reset
integer

Seconds until that budget starts again.

A parameter was refused, or one the operation does not take was sent. The message names it.

Media typeapplication/json
object
error
required
object
code
required

What went wrong. An open enum: treat a code you do not know by its HTTP status.

string
Allowed values: bad_request validation_error invalid_api_key plan_upgrade_required forbidden not_found rate_limited rate_limit_unavailable upstream_unavailable internal_error
message
required

For people. Branch on code.

string
requestId
required

Quote it when you write to us about this request.

string
Example
{
"error": {
"code": "bad_request"
}
}

invalid_api_key: no key, or one that is malformed, unknown, revoked or expired. One answer for all of them.

Media typeapplication/json
object
error
required
object
code
required

What went wrong. An open enum: treat a code you do not know by its HTTP status.

string
Allowed values: bad_request validation_error invalid_api_key plan_upgrade_required forbidden not_found rate_limited rate_limit_unavailable upstream_unavailable internal_error
message
required

For people. Branch on code.

string
requestId
required

Quote it when you write to us about this request.

string
Example
{
"error": {
"code": "bad_request"
}
}

plan_upgrade_required: the tenant’s plan does not include API access (the key works again when it does), or does not include what this operation reads.

Media typeapplication/json
object
error
required
object
code
required

What went wrong. An open enum: treat a code you do not know by its HTTP status.

string
Allowed values: bad_request validation_error invalid_api_key plan_upgrade_required forbidden not_found rate_limited rate_limit_unavailable upstream_unavailable internal_error
message
required

For people. Branch on code.

string
requestId
required

Quote it when you write to us about this request.

string
Example
{
"error": {
"code": "bad_request"
}
}

No such resource in your tenant.

Media typeapplication/json
object
error
required
object
code
required

What went wrong. An open enum: treat a code you do not know by its HTTP status.

string
Allowed values: bad_request validation_error invalid_api_key plan_upgrade_required forbidden not_found rate_limited rate_limit_unavailable upstream_unavailable internal_error
message
required

For people. Branch on code.

string
requestId
required

Quote it when you write to us about this request.

string
Example
{
"error": {
"code": "bad_request"
}
}

rate_limited: over a budget. Wait Retry-After seconds.

Media typeapplication/json
object
error
required
object
code
required

What went wrong. An open enum: treat a code you do not know by its HTTP status.

string
Allowed values: bad_request validation_error invalid_api_key plan_upgrade_required forbidden not_found rate_limited rate_limit_unavailable upstream_unavailable internal_error
message
required

For people. Branch on code.

string
requestId
required

Quote it when you write to us about this request.

string
Example
{
"error": {
"code": "bad_request"
}
}
Retry-After
integer

Seconds to wait before trying again.

rate_limit_unavailable or upstream_unavailable: HeaderHawk could not serve this now. Nothing is wrong with the request; try again after Retry-After seconds.

Media typeapplication/json
object
error
required
object
code
required

What went wrong. An open enum: treat a code you do not know by its HTTP status.

string
Allowed values: bad_request validation_error invalid_api_key plan_upgrade_required forbidden not_found rate_limited rate_limit_unavailable upstream_unavailable internal_error
message
required

For people. Branch on code.

string
requestId
required

Quote it when you write to us about this request.

string
Example
{
"error": {
"code": "bad_request"
}
}
Retry-After
integer

Seconds to wait before trying again.