HttpErrorResponseException

open class HttpErrorResponseException(val status: HttpStatusCode, val headers: Headers, val responseBody: String, val oauth2Error: OAuth2Error?, val problemDetails: ProblemDetails?) : IllegalStateException(source)

A non-success HTTP response with its OAuth or RFC 9457 error details, when available.

Extends IllegalStateException, as its ktor-based predecessor did by extending ktor's ResponseException.

Constructors

Link copied to clipboard
constructor(status: HttpStatusCode, headers: Headers, responseBody: String, oauth2Error: OAuth2Error?, problemDetails: ProblemDetails?)
constructor(status: HttpStatusCode, headers: Headers, responseBody: String)

Parses oauth2Error from responseBody, and problemDetails if the response has the media type application/problem+json.

Properties

Link copied to clipboard
expect open val cause: Throwable?
Link copied to clipboard
val headers: Headers
Link copied to clipboard
open override val message: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val status: HttpStatusCode

Functions