Companion

object Companion

Properties

Link copied to clipboard
const val ABOUT_BLANK: String
Link copied to clipboard
const val RETRY: String

The member of what a retry may do (retry).

Link copied to clipboard
const val TYPE_PREFIX: String
Link copied to clipboard
const val VERSION: String

The member of the aggregate's version the problem answered (version).

Functions

Link copied to clipboard
fun of(status: Int, title: String, detail: String?, code: String?, violations: List<Violation> = emptyList(), result: CommandResult? = null, extensions: Map<String, Any?> = emptyMap(), retryAfter: Long? = null, version: Int? = null): Problem

A Problem of the given fields; parameters added later come last, with a default.

Link copied to clipboard
fun ofFailure(failure: Throwable): Problem

The problem a route answers an unexpected failure with: a store that is unavailable is 503 wow.storage.unavailable with Retry-After, a body larger than the codecs take is 413, and anything else a 500 that says nothing of its cause, which the route logs. Never Spring's bare error page.

Link copied to clipboard
fun ofStatus(status: HttpStatus, detail: String? = null): Problem

A problem that is the HTTP status alone.