ApolloHttpException

class ApolloHttpException(statusCode: Int, headers: List<HttpHeader>, body: BufferedSource?, message: String, cause: Throwable?) : ApolloException

The response was received but the response code was not 200

Parameters

statusCode

: the HTTP status code

headers

: the HTTP headers

body

: the HTTP error body. By default, body is always null. You can opt-in exposeHttpErrorBody in HttpNetworkTransport if you need it. If you're doing this, you must call BufferedSource.close on body to avoid sockets and other resources leaking.

Constructors

ApolloHttpException
Link copied to clipboard
common
fun ApolloHttpException(statusCode: Int, headers: List<HttpHeader>, body: BufferedSource?, message: String, cause: Throwable? = null)
: the HTTP status code

Properties

body
Link copied to clipboard
common
val body: BufferedSource?
: the HTTP error body.
cause
Link copied to clipboard
common
open val cause: Throwable?
headers
Link copied to clipboard
common
val headers: List<HttpHeader>
: the HTTP headers
message
Link copied to clipboard
common
open val message: String?
statusCode
Link copied to clipboard
common
val statusCode: Int
: the HTTP status code