UpstreamError

class UpstreamError(status: Int, val headers: HttpHeaders, body: ByteArray) : UpstreamFailure(source)

The server answered with a status the caller must handle. It keeps the response headers and body, copied in and read back as copies, and prints neither: message and toString() carry the status only.

Stable Core. Message: The server answered with status <status>.

Parameters

status

the response status, in 100..599.

headers

the response headers.

body

the response body; copied.

Throws

if status is outside 100..599.

Constructors

Link copied to clipboard
constructor(status: Int, headers: HttpHeaders, body: ByteArray)

Properties

Link copied to clipboard

The body's size in bytes.

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard

The response headers.

Link copied to clipboard
open val message: String?
Link copied to clipboard
val status: Int

The response status, in 100..599.

Functions

Link copied to clipboard

Returns the body.