isClientError property

bool get isClientError

Check if exception is due to client error (4xx)

Implementation

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