ResponseBytesException

class ResponseBytesException(val response: Response, val bodyBytes: ByteArray?, cause: Throwable? = null) : Exception(source)

An exception that gets thrown if we receive a response whose body cannot be converted into raw bytes.

Constructors

Link copied to clipboard
constructor(response: Response, bodyBytes: ByteArray?, cause: Throwable? = null)

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