class NetworkError
extends BaseError

Custom error class for network errors

Constructors

new
NetworkError(
message: string,
url: string,
statusCode?: number,
retryable?: boolean,
)

Creates a new NetworkError

Static Methods

private
getErrorCode(statusCode?: number): ErrorCode

Gets error code from status code

Properties

readonly
retryable: boolean

Whether the request can be retried

readonly
optional
statusCode: number

HTTP status code if available

readonly
url: string

URL that failed

Usage

import { NetworkError } from ".";