Function: networkError()
@providerprotocol/ai / http / networkError
Function: networkError()
Section titled “Function: networkError()”networkError(
error,provider,modality):UPPError
Defined in: src/http/errors.ts:147
Creates a UPPError for network failures (DNS, connection, etc.).
Use this when the request fails before receiving any HTTP response, such as DNS resolution failures, connection refused, or network unreachable.
Parameters
Section titled “Parameters”Error
The underlying Error that caused the failure
provider
Section titled “provider”string
Provider identifier for error context
modality
Section titled “modality”Request modality for error context
Returns
Section titled “Returns”A UPPError with NETWORK_ERROR code and the original error attached