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.