Package-level declarations

Types

Link copied to clipboard
class QueryBindingError @InternalWowApi constructor(val name: String, val msg: String, val code: String)

One rule a request broke: name is where (a JSON path, the absolute logical field, "" for the model or body), code which rule, stable and machine-readable (me.ahoo.wow.api.query.QueryErrorCodes).

Link copied to clipboard
class QueryBusyException(val store: String, val maxConcurrent: Int) : QueryExecutionException

A query its store's QueryBulkhead did not admit: the store already runs maxConcurrent queries, so this one was not run. QueryErrors.BUSY (HTTP 429, with Retry-After); the same query may pass later. The message names no store: its name is the server's configuration. Its cause is a StorageBusyException naming the store, which a subscription handler that ran the query retries as backpressure.

Link copied to clipboard

A query of a dataset that is served but cannot be queried now (me.ahoo.wow.query.dataset.QueryDataset.unavailable, 7.2b-2): QueryErrors.DATASET_UNAVAILABLE (HTTP 409). The message names the dataset and the reason, fixed words such as needs revision; what made it so stays with whoever marked it.

Link copied to clipboard
interface QueryError

A query error as the edge answers it: its framework errorCode, its text and the violations of the request.

Link copied to clipboard

The framework error codes of the query side, as the edge answers them:

Link copied to clipboard
open class QueryExecutionException(message: String, cause: Throwable? = null) : RuntimeException, QueryError

A query the caller got right that the server failed to run: a cursor position that does not encode, a stored record or backend row that breaks integrity (a non-finite number), a storage that failed. QueryErrors.FAILED (HTTP 500), never a me.ahoo.wow.query.schema.QueryViolation: the caller cannot fix it by changing the request.

Link copied to clipboard
class QueryRequestException(val errorMsg: String, val code: String, name: String = BODY, cause: Throwable? = null, val violation: QueryViolation? = null, problem: String? = null) : IllegalArgumentException, QueryError

A query request the client got wrong: IllegalArgument with the human errorMsg and one binding error naming where (name, a JSON path or body) and which rule (code, stable and machine-readable). violation is the catalog entry it renders, when the rule is one (QueryViolation.Kind.REQUEST): the request is then invalid. Decoding errors state only a code: the request is malformed.

Link copied to clipboard

A query the storage could not run because it was unreachable or did not answer in time, a backend's me.ahoo.wow.spi.StorageUnavailableException as cause: QueryErrors.STORAGE_UNAVAILABLE (HTTP 503). The same query may pass once the storage is back.

Link copied to clipboard
class QueryTimeoutException(val timeout: Duration, cause: Throwable? = null) : QueryExecutionException

A query that ran out of the execution time its budget gives it: QueryErrors.TIMEOUT (HTTP 503). The backend received the same timeout to bound the statement natively (statement_timeout, maxTimeMS); the core enforces it as well, so a backend that ignores it still fails here.