ResponseException

class ResponseException(val response: Response, val bodyBytes: ByteArray?) : Exception(source)

An exception that gets thrown if we receive a response whose code is not in the 200 (OK) range.

Constructors

Link copied to clipboard
constructor(response: Response, bodyBytes: ByteArray?)

Properties

Link copied to clipboard

The raw bytes of the response body, if any. They are passed in directly instead of queried from the Response object because that needs to happen asynchronously, and we need to create the exception message immediately.

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard
open val message: String?
Link copied to clipboard
val response: Response

Functions

Link copied to clipboard
open override fun toString(): String