Optional ReadonlydurationHow long the request ran before it failed, in milliseconds.
A value close to zero usually means the request never left the browser; a large one points at a connection that was established and then lost.
Optional ReadonlyendpointPath of the request that failed, relative to the API client's base path — for example
/agt_x/chat/cht_y.
ReadonlykindAlways 'NetworkError'. Branch on it to tell this failure from the other SDK errors.
Optional ReadonlymethodHTTP method of the request that failed, such as GET or POST.
Optional ReadonlyonlineThe browser's navigator.onLine at the moment of the failure — false when the device
reported itself offline.
Optional ReadonlyoriginalThe error or value that caused this one, when the SDK was wrapping something else.
For a NetworkError this is the browser's own fetch rejection. It is not
serialized as-is: toJson() takes only an Error cause's
message.
Optional ReadonlyvisibilityThe page's document.visibilityState at the moment of the failure.
'hidden' means the tab was in the background, where browsers throttle or suspend network
activity.
Serializes the error, adding the captured context to what BaseError.toJson() already returns.
Each of endpoint, method, durationMs, online and visibility is included only when it
was captured.
The error as plain, JSON-serializable data.
A request to the Agents API never reached the server, so no response came back.
This is the transport failure counterpart of HttpError, where the server did answer: the browser's
fetchrejected outright because the device is offline, DNS or TLS failed, the connection was refused or the request was blocked, for instance by CORS or an extension. Like HttpError it is both handed to onError and thrown, so it also rejects the promise of the method that made the request; for the message-send request behind chat() the callback may not fire, but the error is still thrown. A request the SDK cancelled itself is not reported this way — the browser's ownAbortErroris rethrown unchanged.The message is always
'Network request failed'; the browser's own wording, such as'Failed to fetch', is kept in originalError and appears ascausein toJson(). The remaining properties record what was happening at the time, which is usually what distinguishes a dropped connection from a tab that was backgrounded.