Package-level declarations

Types

Link copied to clipboard
class ErrorStatuses(manifest: Manifest, overrides: Map<String, Int> = emptyMap())

The HTTP status of each error code, from the Manifest's tables:

Link copied to clipboard
class FailureProblems(statuses: ErrorStatuses, mappers: List<ProblemMapper> = emptyList(), catalog: Set<String> = emptySet())

The problem a route answers a failure with that is none of its own (#6510): the one step the application's routes (GlobalErrors), Wow's public routes and the query routes share, each keeping before it only what is its own (a service route's refusal, a query's error).

Link copied to clipboard
class GlobalErrors(manifest: Manifest, options: WowHttpOptions = WowHttpOptions(), mappers: List<ProblemMapper> = emptyList()) : WebExceptionHandler, Ordered

The error handling of the application's own routes (review M; 9.x DefaultGlobalExceptionHandler): a failure that escapes a route the application serves beside Wow's is answered as an RFC 9457 problem of the same shape and codes as the framework routes' (Problem), never Spring's default error body, by the step Wow's routes take (FailureProblems):

Link copied to clipboard
class LingeringClose(linger: Duration = LINGER) : ChannelDuplexHandler

A lingering close (#7001): a connection that closes after an answer written before its request's body was read to its end does not close at once. A server that closes with bytes of the body unread has its connection reset by a Linux kernel, and the reset throws away the answer the client has not read yet: the 413 of a body past the limit, sent with Connection: close, or a refusal of the server's own (ServerRefusals). So the handler shuts the output down, the answer written, reads and discards what the client still sends, and closes when the client closes, or after linger, as nginx's lingering_timeout does.

Link copied to clipboard
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: Duration? = null, val version: Int? = null, retry: RetryAdvice? = 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. A domain's extensions, a rejection's or a service route refusal's, also leave out the names Wow keeps for members of its own (requestId, traceId, errors; domainExtensions).

Link copied to clipboard

A server's read timeout (#6973): the longest a request's body may stall, nothing of it read, from the request's headers to the body's end. It never bounds the answer: a stream or a wait runs as long as it does.

Link copied to clipboard
class ServerRefusals(limits: ServerRefusals.Limits) : ChannelDuplexHandler

The server's own refusals as problems (#6956): a request Reactor Netty cannot decode, a request line or a header block past its limit or malformed HTTP, is answered by it before any route runs, with its status (414, 431 or 400) and an empty body. This handler gives that answer a problem's body, status alone as the 413 of a body past the codecs' limit is (tooLargeProblem), its detail naming the limit and the key that sets it (limits).