JevApiException

open class JevApiException(val status: Int, val body: String?, headers: Map<String, List<String>>, val requestId: String?, val endpoint: String, message: String, cause: Throwable? = null) : JevException(source)

The API answered with an error, or with a body jev4k couldn't use. body is the raw response body, requestId the x-typesafe-request-id header, and endpoint the method and URL called.

On the JVM it is Serializable, as every Throwable is, provided any headers map passed in is.

Inheritors

Constructors

Link copied to clipboard
constructor(status: Int, body: String?, headers: Map<String, List<String>>, requestId: String?, endpoint: String, message: String, cause: Throwable? = null)

Properties

Link copied to clipboard
val body: String?
Link copied to clipboard

body parsed as JSON, or null if it isn't JSON or nests implausibly deep. It is parsed on each read, so the exception holds nothing that isn't Serializable.

Link copied to clipboard
Link copied to clipboard

The response headers, with every name lowercased, so headers["retry-after"] finds the header however the server spelled it and whichever engine read it (CIO keeps the server's spelling, fetch lowercases). Values of names that differ only in case are merged, in order.

Link copied to clipboard
Link copied to clipboard
val status: Int