API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classAssetNetworkError
Structured asset-network failure. Raised whenever the network leg of a load fails - either because the request never completed (offline, DNS, CORS, TLS) or because the server answered with a non-`ok` status. Extends Error, so callers can narrow with `error instanceof AssetNetworkError` and read AssetNetworkError.url and AssetNetworkError.status instead of matching on message text. AssetNetworkError.status being `null` is itself the signal that no response arrived at all, which is what separates "the server said 404" from "the request never left the machine" - a distinction a flat `Error` could not express. For the transport case the original rejection stays reachable through Error.cause. A cancelled load is never reported through this type: an `AbortError` is rethrown untouched so cancellation stays distinguishable from failure.
import { AssetNetworkError } from '@codexo/exojs'Structured asset-network failure. Raised whenever the network leg of a load fails - either because the request never completed (offline, DNS, CORS, TLS) or because the server answered with a non-`ok` status.
Extends Error, so callers can narrow with `error instanceof AssetNetworkError` and read AssetNetworkError.url and AssetNetworkError.status instead of matching on message text. AssetNetworkError.status being `null` is itself the signal that no response arrived at all, which is what separates "the server said 404" from "the request never left the machine" - a distinction a flat `Error` could not express. For the transport case the original rejection stays reachable through Error.cause.
A cancelled load is never reported through this type: an `AbortError` is rethrown untouched so cancellation stays distinguishable from failure.
new(options: AssetNetworkErrorOptionsConstruction options for an AssetNetworkError.): AssetNetworkErrorcause?: unknownmessage: stringname: stringstack?: stringstatus: null | numberstatusText: null | stringurl: string