FrameworkErrors

The framework's error codes and the HTTP status each is answered with: the one table the Manifest's top-level errors (Manifest.errors) and the edge's problem+json answers both read.

The query codes are answered by the query routes (POST /{context}/{aggregate}/{model}/query).

The call code (CALL_COMMAND_FORBIDDEN) is answered by the internal port alone, to a service's synchronous call.

This table is the framework's codes as the JSON contract states them, each with its HTTP status and description; the codes the modules produce are wow-api's FrameworkCodes, which this module cannot depend on, and a test of this module checks that the two name the same set. A domain rejection's code is not here: it is answered with DOMAIN_REJECTION_STATUS unless the host configures another status for it.

The TypeScript client's code table (@ahoo-wang/wow-client, FrameworkErrorCodes) is checked against this one through the snapshot framework-errors.json of this module's tests: changing a code or a status here changes that snapshot, and the client's test fails until its table follows.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Every framework code, in the order of the status table, each with what a retry may do.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
const val COMMAND_BUSY: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
const val DOMAIN_REJECTION_STATUS: Int = 422

The status of a domain rejection, a code the domain chose, unless the host configures another for the code.

Link copied to clipboard
const val INTERNAL_ERROR_STATUS: Int = 500

The status of a framework code ALL does not list.

Link copied to clipboard
const val LEDGER_STALE: String
Link copied to clipboard
const val NODE_CLOSING: String
Link copied to clipboard
const val NODE_STANDBY: String
Link copied to clipboard
Link copied to clipboard

The status of AGGREGATE_VERSION_MISMATCH when the request carried If-Match.

Link copied to clipboard
const val PREFIX: String

The prefix every framework code, and no domain code, starts with.

Link copied to clipboard
const val QUERY_BUSY: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
const val QUERY_FAILED: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
const val RETRY_AFTER_SECONDS: Int = 1

The Retry-After of every framework code a retry may get past: a store restarting or failing over, a busy lane or a closing node is back within seconds, and a client that waits a second spreads its retries rather than repeating them at once.

Link copied to clipboard
const val RETRY_ATTEMPTS: Int = 5

How often a client sends a request at most, the first time included, by default, when a retry may get past its error: the Kotlin client's RetryPolicy.DEFAULT and the TypeScript client's resumes alike.

Link copied to clipboard
const val RETRY_BACKOFF_MILLIS: Int = 200

The wait before a client's first retry without a Retry-After, doubled at each attempt, by default.

Link copied to clipboard

The longest wait before a retry, by default: a backoff stops doubling there, a longer Retry-After fails.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The short title of each framework code, a problem's title (RFC 9457): a summary that is the same for every occurrence of the code. A code's description in ALL explains it further, in the Manifest and the reference.

Link copied to clipboard
const val WAIT_INVALID: String
Link copied to clipboard
const val WAIT_TIMEOUT: String

Functions

Link copied to clipboard
fun problemOf(code: String, message: String, result: CommandResult? = null, cause: Throwable? = null): WowProblemException

The exception of a request a boundary did not carry out for the framework code, said as message: its status, retry and Retry-After as ALL declares them, a code it does not list a 500 no retry gets past. Each boundary (the in-process clients and queries, a client's transport) maps its own failures with it, once.