hasHttpStatusCode property

bool get hasHttpStatusCode

True when ApiError.code falls in the range of a real HTTP status code, meaning it can meaningfully be surfaced as ApiResponse.statusCode.

Declared as an extension rather than a member so that adding it does not oblige every implements ApiError consumer to supply it.

Implementation

bool get hasHttpStatusCode => code >= 100 && code <= 599;