Types

Link copied to clipboard
data class BadGateway(val title: String = "Invalid response received from upstream server", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class BadRequest(val title: String = "The request was invalid", val detail: String? = null, val instance: String? = null) : Problem

40x HTTP Status Codes

Link copied to clipboard
object Companion
Link copied to clipboard
data class Conflict(val title: String = "The request conflicts with the current state", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class DeleteYourAccount(val title: String = "Delete Your Account", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class ExpectationFailed(val title: String = "Server cannot meet the request expectations", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class Explosion(val title: String = "Explosion", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class FailedDependency(val title: String = "The request failed due to a dependent request", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class Forbidden(val title: String = "Access to this resource is forbidden", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class GatewayTimeout(val title: String = "Upstream server response timed out", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class Gone(val title: String = "The resource is no longer available", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class HttpVersionNotSupported(val title: String = "HTTP version used in the request is not supported", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class ImATeapot(val title: String = "Server refuses to brew coffee with a teapot", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class InsufficientStorage(val title: String = "Server has insufficient storage to complete the request", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class InternalServerError(val title: String = "An unexpected error occurred while processing the request", val detail: String? = null, val instance: String? = null) : Problem

50x HTTP Status Codes Indicates a server error

Link copied to clipboard
data class ItsAFeatureNotABug(val title: String = "It's a feature, not a bug", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class ItWorksInMyTimezone(val title: String = "It works in my timezone", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class ItWorksOnMyMachine(val title: String = "It works on my machine", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class KnownUnknowns(val title: String = "Known Unknowns", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class LengthRequired(val title: String = "Content length header is required", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class Locked(val title: String = "The resource is locked", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class LoopDetected(val title: String = "Server detected an infinite loop while processing the request", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class Meh(val title: String = "Meh", val detail: String? = null, val instance: String? = null) : Problem

Unofficial 70x HTTP Status Codes

Link copied to clipboard
data class MethodNotAllowed(val title: String = "The HTTP method is not allowed for this resource", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class MisdirectedRequest(val title: String = "The request was directed to an invalid server", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class NetworkAuthenticationRequired(val title: String = "Network authentication is required to access the resource", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class NotAcceptable(val title: String = "The requested format is not supported", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class NotExtended(val title: String = "Further extensions to the request are required", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class NotFound(val title: String = "The requested resource was not found", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class NotImplemented(val title: String = "The requested functionality is not implemented", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class PayloadTooLarge(val title: String = "The request payload exceeds the size limit", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class PaymentRequired(val title: String = "Payment is required to process this request", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class PreconditionFailed(val title: String = "Request preconditions failed", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class PreconditionRequired(val title: String = "The request requires precondition headers", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class ProxyAuthenticationRequired(val title: String = "Proxy authentication is required", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class RangeNotSatisfiable(val title: String = "The requested range cannot be satisfied", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class RequestHeaderFieldsTooLarge(val title: String = "Request header fields exceed size limits", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class RequestTimeout(val title: String = "The request timed out", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class ServiceUnavailable(val title: String = "The service is temporarily unavailable", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class ThirtyTwoBitsIsPlenty(val title: String = "32 bits is plenty", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class ThisLineShouldBeUnreachable(val title: String = "This line should be unreachable", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class TooEarly(val title: String = "The server is unwilling to process the request", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class TooManyRequests(val title: String = "Request rate limit has been exceeded", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class Tricky(val title: String = "Tricky", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class Unauthorized(val title: String = "Authentication credentials are required", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class UnavailableForLegalReasons(val title: String = "Resource unavailable for legal reasons", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class UnknownUnknowns(val title: String = "Unknown Unknowns", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class Unpossible(val title: String = "Unpossible", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class UnprocessableEntity(val title: String = "The request content is semantically invalid", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class UnsupportedMediaType(val title: String = "The request media type is not supported", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class UpgradeRequired(val title: String = "The client must upgrade to continue", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class UriTooLong(val title: String = "The request URI exceeds the length limit", val detail: String? = null, val instance: String? = null) : Problem
Link copied to clipboard
data class VariantAlsoNegotiates(val title: String = "Server detected an internal configuration error", val detail: String? = null, val instance: String? = null) : Problem

Properties

Link copied to clipboard
abstract val detail: String?

A human-readable explanation specific to this occurrence of the problem.

Link copied to clipboard
abstract val instance: String?

A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.

Link copied to clipboard
open override val status: Int

The HTTP status code (RFC7231, Section 6) generated by the origin server for this occurrence of the problem.

Link copied to clipboard
abstract val title: String?

A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization (e.g., using proactive content negotiation; see RFC7231, Section 3.4).

Link copied to clipboard
open override val type: String

A URI reference RFC3986 that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML W3C.REC-html5-20141028). When this member is not present, its value is assumed to be "about:blank".

Functions

Link copied to clipboard
fun toJson(pretty: Boolean = false): String

Creates a JSON string representation of the problem