problemOf

fun problemOf(result: CommandResult, ifMatch: Boolean = false): Problem

The problem of result, a command that did not succeed.


fun problemOf(failure: WowProblemException, context: String? = null): Problem

The problem of failure, answered as it is wherever it is thrown (an application route, a service route relaying another service's answer): its status, its code and its result, what a retry may do with its Retry-After, in whole seconds rounded up, as the failure says, not as the catalog would for its code, which may not even know it, and its violations, else its result's. Its title is the code's in context.


fun problemOf(code: String, detail: String, context: String? = null): Problem

A problem with code before the command has a ref.