Skip to content

//NetworkResponseAdapter/com.haroldadmin.cnradapter/NetworkResponse/ServerError

ServerError

[jvm]\ data class ServerError<S, E>(body: E?, response: Response<*>?) : NetworkResponse.Error<S, E>

The result of a non 2xx response to a network request.

This result may or may not contain a body, depending on the body supplied by the server.

Constructors

ServerError [jvm]
fun <E> ServerError(body: E?, response: Response<*>?)

Properties

Name Summary
body [jvm]
open override val body: E?
The body of the failed network request, if available.
code [jvm]
val code: Int?
The status code returned by the server.
error [jvm]
open override val error: Throwable? = null
Always null for a ServerError.
headers [jvm]
val headers: Headers?
The headers returned by the server.
response [jvm]
val response: Response<*>?