HttpError

sealed interface HttpError

An error occurring due to an HTTP request failing.

Inheritors

Types

Link copied to clipboard
data class BadStatusCode(val url: String, val code: Int, val responseBody: String?) : HttpError

The HTTP request returned an invalid status code.

Link copied to clipboard
data class ExceptionThrown(val url: String, val e: Exception) : HttpError

An exception was thrown during the HTTP request.

Link copied to clipboard
data class MissingResponseBody(val url: String) : HttpError

The HTTP response was expected to have a body.

Properties

Link copied to clipboard
abstract val description: String

A human-readable description of the error.

Link copied to clipboard
abstract val url: String

The URL of the failed request.