NetworkResponseException

data class NetworkResponseException(val status: HttpStatusCode, val error: String) : Throwable

Wraps a non-2xx HTTP response so it can travel as a Throwable through safeNetworkCall (extensions/ResultExtensions.kt) — carries the real status code and raw body text, which is what lets SendNetworkRequest/UploadFile's onNetworkFailure(code) matching (and GetScreen's equivalent) branch on the exact status.

Constructors

Link copied to clipboard
constructor(status: HttpStatusCode, error: String)

Properties

Link copied to clipboard
expect open val cause: Throwable?
Link copied to clipboard

the raw response body text.

Link copied to clipboard
expect open val message: String?
Link copied to clipboard
val status: HttpStatusCode

the HTTP status code of the failing response.

Functions

Link copied to clipboard

Whether this error, or any error in its cause chain, reports that the device ran out of storage. Platforms expose no common type for this, so it matches the markers each one puts in its message: POSIX ENOSPC ("No space left on device") on Android/JVM/iOS, "There is not enough space on the disk" on Windows, and OPFS's QuotaExceededError on the web.