Problem

class Problem @InternalWowApi constructor(val status: Int, val title: String, val detail: String?, val code: String?, val violations: List<Violation> = emptyList(), val result: CommandResult? = null, val extensions: Map<String, Any?> = emptyMap(), retryAfter: Long? = null, val version: Int? = null, retry: Retry? = null)

An RFC 9457 problem as the public port writes it: type is urn:wow:error:<code>, the extension members are code, what a retry may do (retry, with Retry-After when a retry may get past it), violations, the whole result of a command that has a ref, the aggregate's version the problem answered, and the extensions of its rejection, each a member of its own name; one without a value, or with the name of a member above (retry and version among them, even on a problem without one) or of RFC 9457's instance, is left out.

An error answered before a command has a ref (401, a malformed header, a missing route, 406, 415) carries no result. One that is only HTTP's (a missing route, 406, 415) has no Wow code: its type is about:blank, as RFC 9457 says of a problem that is the status alone.

Constructors

Link copied to clipboard
constructor(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, retry: Retry? = null)

Types

Link copied to clipboard
object Companion

Properties

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

What a retry may do, the retry member: as given, else as the error catalog declares it for code (FrameworkErrors.ALL); none for a code the catalog does not list, a domain's among them.

Link copied to clipboard

The seconds after which the request may be retried, written as Retry-After (not a member of the body) when a retry may get past it (retryAfterHeader): as given, else the catalog's for code.

Link copied to clipboard

The Retry-After the response carries: retryAfter, when a retry may get past the problem.

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

urn:wow:error:<code>, or about:blank without a code.

Link copied to clipboard
val version: Int?

The aggregate's version the problem answered, the one meaning of the version member: a rejection's (the version its events reached, else the one the decision saw: the next If-Match; none for a creation's), or the current version a state read below its minimum version was answered with; null for any other problem.

Link copied to clipboard

Functions

Link copied to clipboard
fun copyWith(status: Int = this.status, title: String = this.title, detail: String? = this.detail, code: String? = this.code, violations: List<Violation> = this.violations, result: CommandResult? = this.result, extensions: Map<String, Any?> = this.extensions, retryAfter: Long? = this.retryAfter, version: Int? = this.version, retry: Retry = this.retry): Problem

This Problem with the given fields replaced: Wow's own copy, left out of the ABI.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

The members as written: those without a value are left out.

Link copied to clipboard
suspend fun respond(): ServerResponse

This problem as a response, with Retry-After when a retry may get past it (retryAfterHeader).

Link copied to clipboard
open override fun toString(): String