isServerError property

bool get isServerError

Check if exception is due to server error (5xx)

Implementation

bool get isServerError =>
    statusCode != null && statusCode! >= 500 && statusCode! < 600;