isClientError property

bool get isClientError

Whether this is a client error (4xx status code)

Implementation

bool get isClientError => statusCode != null && statusCode! >= 400 && statusCode! < 500;