ApolloHttpException

constructor(statusCode: Int, headers: List<HttpHeader>, body: BufferedSource?, message: String, cause: Throwable? = null)

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 HttpNetworkTransport.httpExposeErrorBody if you need it. If you're doing this, you must call BufferedSource.close on body to avoid sockets and other resources leaking.