NetworkError
The error type surfaced by NetworkClient. Mirrors SwiftyNetwork's NetworkError.
Every failure a request can produce is mapped onto one of these cases, so callers can branch on a closed set instead of inspecting raw transport exceptions.
Inheritors
Types
A 401 was received and the authorization provider could not refresh the credential.
The response body failed to decode into the requested type.
The request body failed to encode.
HTTP 403.
The response body was missing or unreadable.
The response could not be interpreted as HTTP.
The endpoint produced a malformed URL.
The device appears to be offline / the host was unreachable.
HTTP 404.
A non-2xx status outside the specifically-mapped cases below, carrying the raw body and the parsed Retry-After hint in milliseconds (retryAfterMillis), when the server sent one.
The request exceeded its timeout.
HTTP 401.
Any other transport-level failure.